Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Stepping out of signal handler problem
@ 2008-05-16 16:27 Aleksandar Ristovski
  2008-05-16 17:33 ` Mark Kettenis
  0 siblings, 1 reply; 4+ messages in thread
From: Aleksandar Ristovski @ 2008-05-16 16:27 UTC (permalink / raw)
  To: gdb

Hello,

I have a problem with stepping out of signal handler (on Neutrino OS). 

I am using sigstep (testsuite/gdb.base) test: When breakpoint is hit inside 'handler', and then doing step or stepi, gdb will not stop inside 'main'. 

I have identified the problem, but do not know how to solve it. 

The description of the problem:

After 'handler' returns to signal trampoline, we can properly identify context using current method (retrieving context pointer from EDI register) up to a point where our function restores EDI to state before signal (which is exactly the next stepi away). After this, until the sigreturn kernel call, the context is wrong.

The question 1: how should this (properly) be handled?

I tried to make a static var and keep context pointer until a non-sigtramp frame is identified, but that didn't work either, even with proper context gdb would still not 'land' into the main where it's supposed to, but rather behaves as if 'continue' was given.

This makes question 2: Is the only way to implement this similar to linux-nat (scanning for sigreturn kernel call)? Is there anything 'cleaner'?


Any hint would be appreciated.

Thanks,

Aleksandar Ristovski
QNX Software Systems


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-05-16 20:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-16 16:27 Stepping out of signal handler problem Aleksandar Ristovski
2008-05-16 17:33 ` Mark Kettenis
2008-05-16 18:48   ` Aleksandar Ristovski
2008-05-16 20:42     ` Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox