PPC debug setcontext syscall implementation

2 messages, 2 authors, 2004-12-02 · open the first message on its own page

PPC debug setcontext syscall implementation

From: Corey Minyard <hidden>
Date: 2004-12-02 20:48:26

Hello all,

I have attached a patch with the implementation of the debug_setcontext 
system call.  The syscall has been reserved for a while and I've posted 
this before.  So I've ported to the newest kernel and here it is again.

This syscall allows signal handlers to perform debug functions.  It 
allows the signal handler to turn on single-stepping, for instance, and 
the thread will get a trap after executing the next instruction.  It can 
also (on supported PPC processors) turn on branch tracing and get a trap 
after the next branch instruction is executed.  This is useful for 
in-application debugging.

A small test program is also attached that demonstrates the use of this 
interface.

Thanks,

-Corey

Re: PPC debug setcontext syscall implementation

From: Tom Rini <hidden>
Date: 2004-12-02 22:23:52

On Thu, Dec 02, 2004 at 02:41:32PM -0600, Corey Minyard wrote:
Hello all,

I have attached a patch with the implementation of the debug_setcontext 
system call.  The syscall has been reserved for a while and I've posted 
this before.  So I've ported to the newest kernel and here it is again.

This syscall allows signal handlers to perform debug functions.  It 
allows the signal handler to turn on single-stepping, for instance, and 
the thread will get a trap after executing the next instruction.  It can 
also (on supported PPC processors) turn on branch tracing and get a trap 
after the next branch instruction is executed.  This is useful for 
in-application debugging.
I asked Corey off-list, and this is vs 2.6.10-rc2-mm3.
I propose (and will update the patch tracker
(http://ozlabs.org/ppc32-patches/, I don't recall if/how well it was
advertised)) that so long as KGDB still works (I'll even go test it on
classic) as well as GDB testsuite (this is a 'touchy' area, so I'd like
to well-test changes) is still 'OK', pushing this into 2.6.11.

-- 
Tom Rini
http://gate.crashing.org/~trini/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help