From: Jerome Guitton <guitton@adacore.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFA] dwarf2loc, guard against null
Date: Mon, 17 Sep 2007 13:10:00 -0000 [thread overview]
Message-ID: <20070917131052.GA28874@adacore.com> (raw)
In-Reply-To: <20070917123048.GA8537@caradoc.them.org>
Daniel Jacobowitz (drow@false.org):
> On Mon, Sep 17, 2007 at 02:26:54PM +0200, Jerome Guitton wrote:
> > * retry to print the variable => end up in dwarf_expr_frame_base,
> > no frame, crash.
> >
> > We are (probably) still using a wrong .debug_info at this point.
>
> Yeah. Shouldn't you have gotten a "no such variable in this scope"
> error? I'm not sure how symbol lookup found a local variable without
> any frame.
Right. Actually, it got the selected frame (deprecated_selected_frame)
in deprecated_safe_get_selected_frame. This function reads:
struct frame_info *
deprecated_safe_get_selected_frame (void)
{
if (!target_has_registers || !target_has_stack || !target_has_memory)
return NULL;
return get_selected_frame (NULL);
}
When the inferior is dead, target_has_registers (resp.
target_has_memory, target_has_stack) should be false and
deprecated_safe_get_selected_frame should return NULL. This is the bug
in my vxWorks-specific backend (I should pop some target vector at
mourn_inferior, I guess).
Anyway, when deprecated_safe_get_selected_frame returns NULL, I get the
message "Address of "db" is unknown". Much better.
Now back to the original problem: assertion or error? I guess that the
question is: in which cases get_frame_block can return NULL?
next prev parent reply other threads:[~2007-09-17 13:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-17 12:04 Jerome Guitton
2007-09-17 12:15 ` Daniel Jacobowitz
2007-09-17 12:27 ` Jerome Guitton
2007-09-17 12:30 ` Daniel Jacobowitz
2007-09-17 13:10 ` Jerome Guitton [this message]
2007-09-17 13:20 ` Daniel Jacobowitz
2007-09-17 13:42 ` Jerome Guitton
2007-09-17 13:52 ` Daniel Jacobowitz
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=20070917131052.GA28874@adacore.com \
--to=guitton@adacore.com \
--cc=gdb-patches@sourceware.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