Re: ddb problems

From: Peter Edwards <peadar_at_freebsd.org>
Date: Mon, 23 Aug 2004 21:44:37 +0100
Marco Molteni wrote:

>On Mon, 23 Aug 2004 11:51:41 -0400
>Brian Fundakowski Feldman <green_at_freebsd.org> wrote:
>
>  
>
>>On Mon, Aug 23, 2004 at 08:57:43AM +0200, Michiel Boland wrote:
>>    
>>
>>>Hi. I can't seem to get anything useful out of ddb with recent
>>>-CURRENTs. I get things like double faults, page faults, or endless
>>>streams of console messages. Is anyone else seeing this?
>>>      
>>>
>>Yes, I'm seeing exactly that behavior, unfortunately.
>>    
>>
>
>me too, on
>ddb
>gdb in the base system
>gdb53 in the ports
>
>marco
>  
>

DDB hasn't being adjusting the trap frame to skip over breakpoints 
properly since the KDB work. Marcel knows about the issue: in the 
meantime, the attached patch gives me a workable breakpoints for DDB at 
the expense of some incorrect informational messages switching away from 
the active thread (this is Marcel's variant of my inferior band-aid :-))

Index: i386/include/db_machdep.h
===================================================================
RCS file: /usr/cvs/FreeBSD-CVS/src/sys/i386/include/db_machdep.h,v
retrieving revision 1.18
diff -u -r1.18 db_machdep.h
--- i386/include/db_machdep.h	10 Jul 2004 23:47:19 -0000	1.18
+++ i386/include/db_machdep.h	23 Jul 2004 00:51:06 -0000
_at__at_ -35,7 +35,7 _at__at_
 typedef	vm_offset_t	db_addr_t;	/* address - unsigned */
 typedef	int		db_expr_t;	/* expression - signed */
 
-#define	PC_REGS()	((db_addr_t)kdb_thrctx->pcb_eip)
+#define	PC_REGS()	((db_addr_t)kdb_frame->tf_eip)
 
 #define	BKPT_INST	0xcc		/* breakpoint instruction */
 #define	BKPT_SIZE	(1)		/* size of breakpoint inst */
Received on Mon Aug 23 2004 - 18:44:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:08 UTC