Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Fix breakpoint condition that use member variables.
Date: Sat, 22 Mar 2008 12:07:00 -0000	[thread overview]
Message-ID: <u8x0bgdys.fsf@gnu.org> (raw)
In-Reply-To: <200803221240.16230.vladimir@codesourcery.com>

> From: Vladimir Prus <vladimir@codesourcery.com>
> Date: Sat, 22 Mar 2008 12:40:15 +0300
> 
> Suppose that foo.cpp:10 is a location inside member function of a class,
> and that said class has member variable i_, and that we've just started
> a program and are in main. Then:
> 
>     break foo.cpp:10 if i_ == 10
> 
> will not work, claiming that i_ does not exist. The problem is that
> lookup_symbol_aux uses value_of_this, which uses value_of_local and
> that totally ignores the block that is passed to parse_exp_1 by
> the breakpoint code and uses the block of the selected frame. Of course,
> that either does not have "this", or has wrong "this".
> 
> This patch fixes the problem by looking in the right block directly,
> and also by looking for the field in the type of "this", without
> trying to get the value.

What will happen after your patch if there's also a variable i_ in the
selected frame?


  reply	other threads:[~2008-03-22 12:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-22  9:40 Vladimir Prus
2008-03-22 12:07 ` Eli Zaretskii [this message]
2008-03-22 12:36   ` Vladimir Prus
2008-03-22 12:56     ` Eli Zaretskii
2008-03-22 13:20       ` Vladimir Prus
2008-03-22 14:49       ` Daniel Jacobowitz
2008-03-22 17:14         ` Eli Zaretskii
2008-03-24 18:05           ` Michael Snyder
2008-03-24 20:18             ` Eli Zaretskii
2008-03-24 21:04               ` Michael Snyder
2008-04-01 14:10 ` Daniel Jacobowitz
2008-04-03 12:51   ` Vladimir Prus
2008-04-03 13:33     ` 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=u8x0bgdys.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=vladimir@codesourcery.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