>I vaguely remember using a patched ARM kernel (probably one of the
>late 2.1 series) that gave complete stack traces in response to faults
>in usermode programs rather than just the pc and lr. I can't seem to
>find the functionality in the linux-2.2.1-rmk2-np1 derived kernel I'm
>currently using even with CONFIG_DEBUG_USER enabled.

It's not really something that belongs in the kernel.  If you want to add it 
yourself it's not hard, though.  You just need to find the places where faults 
are trapped -- mm/fault-common.c is probably the most profitable place to 
start (look for the bits that already have #ifdef CONFIG_DEBUG_USER clauses).  
To get a register dump, add a call to show_regs(), and to get a backtrace add 
a call to c_backtrace().  Look at the code in kernel/traps.c::die_if_kernel for 
an example.

>[1] Unless anyone has successfully compiled an SA1100 version of gdb
>    that contains the necessary magic for debugging multithreading
>    targets.

In the long term this is probably a better course to pursue.  You could also 
consider implementing the missing debugging support for ARM machines in 
GNU libc.  Currently the catchsegv script should give you a register dump but 
probably not a backtrace.

p.


unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]

Reply via email to