From: Daniel Jacobowitz <drow@false.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] no frame needed when computing address of subprogram
Date: Wed, 02 Jan 2008 13:04:00 -0000 [thread overview]
Message-ID: <20080102125718.GB30490@caradoc.them.org> (raw)
In-Reply-To: <20080101134652.GB3770@adacore.com>
On Tue, Jan 01, 2008 at 05:46:52AM -0800, Joel Brobecker wrote:
> The problem is inside eval.c:evaluate_subexp_for_address, in the case
> handling the OP_VAR_VALUE case. Unless we are in EVAL_AVOID_SIDE_EFFECT
> mode, we end up doing:
>
> if (noside == EVAL_AVOID_SIDE_EFFECTS)
> [...]
> else
> return
> locate_var_value
> (var,
> block_innermost_frame (exp->elts[pc + 1].block));
>
> In particular, we are trying to get the block_innermost_frame,
> which doesn't exist in our case. The attached patch changes
> that to first check that we need a frame to get the object
> address, otherwise, we locate the value without a frame.
Seems reasonable - but why does it have a block set?
block_innermost_frame:
353 if (block == NULL)
354 return NULL;
c-exp.y:
if (symbol_read_needs_frame (sym))
{
if (innermost_block == 0 ||
contained_in (block_found,
innermost_block))
innermost_block = block_found;
}
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2008-01-02 13:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-01 13:48 Joel Brobecker
2008-01-02 13:04 ` Daniel Jacobowitz [this message]
2008-01-02 13:55 ` Joel Brobecker
2008-01-02 14:08 ` Daniel Jacobowitz
2008-01-03 4:18 ` Joel Brobecker
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=20080102125718.GB30490@caradoc.them.org \
--to=drow@false.org \
--cc=brobecker@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