Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc] Use frame_type for sigtramp test in infrun.c
Date: Sun, 21 Mar 2004 22:38:00 -0000	[thread overview]
Message-ID: <405E1965.2010005@gnu.org> (raw)
In-Reply-To: <40574DFC.9060706@gnu.org>

> Hello,
> 
> The attached patch modifies infrun.c so that, for the non-legacy case, the test:
>     frame_type == SIGTRAMP frame
>     && step_frame_id != stop_frame_id
> is used to determine if a single-step caused the inferior to stumble into a signal trampoline (either via a signal, or by returning from the handler).  This replaces two pc_in_sigtramp calls and a stack-pointer heuristic -- not the most robust of tests.
> 
> The new test:
> 
> - eliminates the call pc_in_sigtramp(step_pc)
> (i.e., on the PC from before the single step) (this was an unexpected bonus :-)
> 
> - uses the caching call get_frame_type call
> pc_in_sigtramp has to re-do all the computation each time it is called (typically duplicating the effort of get_frame_type)
> 
> - uses !frame_id_eq
> Which is a 100% robust frame-changed test.  The old test couldn't detect a signal trampoline calling (via a signal) a singnal trampoline.
> 
> thoughts?
> 
> I'll look to commit this in a few days (already committed to my trad-frame branch).

I've checked this in.

Andrew

> 2004-03-16  Andrew Cagney  <cagney@redhat.com>
> 
> 	* infrun.c (handle_inferior_event): For non legacy frames, use the
> 	frame ID and frame type to identify a signal trampoline.  Update
> 	comments.



  parent reply	other threads:[~2004-03-21 22:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-16 18:57 Andrew Cagney
2004-03-19  0:09 ` Andrew Cagney
2004-03-21 22:38 ` Andrew Cagney [this message]
2004-03-29 23:38 Ulrich Weigand
2004-03-31 21:49 ` Andrew Cagney
2004-04-02 20:50 ` Andrew Cagney
2004-04-02 23:57   ` Joel Brobecker
2004-04-03  0:08   ` Joel Brobecker
2004-04-03  1:01     ` Andrew Cagney
2004-04-06  1:48       ` Joel Brobecker
2004-04-06 16:21         ` Joel Brobecker
2004-04-06 17:48           ` Andrew Cagney
2004-04-06 17:54             ` Daniel Jacobowitz
2004-04-06 18:11               ` Andrew Cagney
2004-04-06 23:33                 ` Andrew Cagney
2004-04-29 22:46         ` Andrew Cagney

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=405E1965.2010005@gnu.org \
    --to=cagney@gnu.org \
    --cc=gdb-patches@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