Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Randolph Chung <randolph@tausq.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] segfault in get_prev_frame
Date: Wed, 10 Nov 2004 23:23:00 -0000	[thread overview]
Message-ID: <4192A296.2040708@gnu.org> (raw)
In-Reply-To: <20041110224801.GN15714@tausq.org>

Randolph Chung wrote:
> sigh, found a bug in the inside_entry_func logic that i just
> committed...
> 
> if you jump backwards in a backtrace (i.e you are at frame 0, and you
> do "frame 4") you will get a segfault because the frame unwinder is not
> yet filled in. using get_frame_type will do the necessary lazy
> initialization.
> 
> ok to check in?

Yes (add it to your raincheck :-).

Andrew

> 2004-11-10  Randolph Chung  <tausq@debian.org>
> 
> 	* frame.c (get_prev_frame): Use get_frame_type to retrieve the frame's
> 	type.
> 
> Index: frame.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/frame.c,v
> retrieving revision 1.194
> diff -u -p -r1.194 frame.c
> --- frame.c	10 Nov 2004 21:17:56 -0000	1.194
> +++ frame.c	10 Nov 2004 22:41:40 -0000
> @@ -1239,7 +1239,7 @@ get_prev_frame (struct frame_info *this_
>       stop at main, we should at least stop at the entry point of the
>       application.  */
>    if (!backtrace_past_entry
> -      && this_frame->unwind->type != DUMMY_FRAME && this_frame->level >= 0
> +      && get_frame_type (this_frame) != DUMMY_FRAME && this_frame->level >= 0
>        && inside_entry_func (this_frame))
>      {
>        frame_debug_got_null_frame (gdb_stdlog, this_frame, "inside entry func");
> 


      reply	other threads:[~2004-11-10 23:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-10 22:48 Randolph Chung
2004-11-10 23:23 ` Andrew Cagney [this message]

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=4192A296.2040708@gnu.org \
    --to=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=randolph@tausq.org \
    /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