Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Aleksandar Ristovski <aristovski@qnx.com>
To: gdb@sources.redhat.com
Subject: Stepping out of signal handler problem
Date: Fri, 16 May 2008 16:27:00 -0000	[thread overview]
Message-ID: <g0kcje$md5$1@ger.gmane.org> (raw)

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


             reply	other threads:[~2008-05-16 16:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-16 16:27 Aleksandar Ristovski [this message]
2008-05-16 17:33 ` Mark Kettenis
2008-05-16 18:48   ` Aleksandar Ristovski
2008-05-16 20:42     ` Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='g0kcje$md5$1@ger.gmane.org' \
    --to=aristovski@qnx.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox