Subject: Re: issues with KGDB and ARM
To: Hiroyuki Bessho <bsh@grotto.jp>
From: Karl Janmar <karl@utopiafoundation.org>
List: port-arm
Date: 03/29/2005 23:25:44
Hi,

I have double checked now, I don't have DDB defined, and I think I can
trace the whole path to where
KERNEL_BREAKPOINT is incorrectly written.

sys/kern/kgdb_stub.c:kgdb_trap() ---->
sys/ddb/db_run.c:db_set_single_step() ---->
sys/arch/arm/include/db_machdep.h:BKPT_SET()

hmm...  I don't see where the DDB define matter anyway, since the
BKPT_SET() macro is always using KERNEL_BREAKPOINT that is define
without any ifdefs that changed depending on debugging method?

Regards,
Karl

Hiroyuki Bessho wrote:
> At Tue, 29 Mar 2005 01:13:05 +0200,
> Karl Janmar wrote:
> 
>>Hi there ARM hackers!
>>
>>I have put some work in my GP32 port (which I talked about erlier in 
>>this list). I had some issues when I was using KGDB with netbsd/arm.
>>I use the 2.0 Release as my source base.
>>
>>  I needed to do some modification to generate a valid KGDB undefined 
>>instruction when single stepping, if I don't do this the kernel will 
>>generate an unhandled undefined exception.
>>
>>This happen when sys/ddb/db_run.c: db_set_single_step() calling machdep 
>>stuff in db_machdep.c inserting a BKPT_INST.
>>
> 
> 
>   Do you have both DDB and KGDB defined in your config file?  I guess
> so because db_run.c:db_set_single_step() is in #if defined(DDB)
> region.
> 
>   Do you have same problems if you undefine DDB?
> --
> bsh.