From: Sterling Augustine <saugustine@google.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Tom Tromey <tromey@redhat.com>, niko.sams@gmail.com, gdb@sourceware.org
Subject: Re: watchpoint on variable in function scope
Date: Thu, 02 Jun 2011 18:43:00 -0000 [thread overview]
Message-ID: <BANLkTinENfk1UCkCXGGd5eJc0E_jYjxv8ZMpLpASMCw_x9cqEA@mail.gmail.com> (raw)
In-Reply-To: <838vtkf7lx.fsf@gnu.org>
Tom's test case works fine for me if I compile it as a C program.
However, it fails if I compile it as a C++ program. (Using gcc 4.4.3.)
Looking at the assembly, the C code names the static "i.1591", but the
C++ code uses "_ZZ3foovE1i".
So this seems to be a C++ name look up failure. Not sure it how should work.
$ gcc ~/bar.c -g
$ ./gdb ./a.out
GNU gdb (GDB) 7.2.90.20110513-cvs
...
(gdb) watch foo::i
Watchpoint 1: foo::i
(gdb) run
Starting program: ./a.out
Hardware watchpoint 1: foo::i
Old value = 0
New value = 1
foo () at /home/saugustine/bar.c:4
4 }
next prev parent reply other threads:[~2011-06-02 18:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 21:22 Niko Sams
2011-06-02 17:22 ` Tom Tromey
2011-06-02 17:48 ` Eli Zaretskii
2011-06-02 18:07 ` Niko Sams
2011-06-02 18:43 ` Sterling Augustine [this message]
2011-06-13 17:43 ` Tom Tromey
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=BANLkTinENfk1UCkCXGGd5eJc0E_jYjxv8ZMpLpASMCw_x9cqEA@mail.gmail.com \
--to=saugustine@google.com \
--cc=eliz@gnu.org \
--cc=gdb@sourceware.org \
--cc=niko.sams@gmail.com \
--cc=tromey@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