From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: "Liu, Lei" <lei.liu2@windriver.com>
Subject: Re: [PATCH] call cp_lookup_symbol_namespace recursively to search symbols in C++ base classes
Date: Wed, 03 Nov 2010 17:57:00 -0000 [thread overview]
Message-ID: <201011031757.10712.pedro@codesourcery.com> (raw)
In-Reply-To: <4CD0CF42.8010203@windriver.com>
FYI, I'm still looking at this. I found out that in the case
there's global symbol with the same name of the class symbol that
we actually want, gdb finds _that_:
enum E { X, Y, Z } ee;
class A
{
public:
enum E { X, Y, Z };
};
class B : public A
{
public:
void test (E e);
};
void B::test(E e)
{
if (e == X) /* set breakpoint here */
test (Z);
}
Meaning, when stopped at the breapoint line, we'd get:
(gdb) p X
$1 = X
Instead of the correct:
(gdb) p X
$1 = A::X
Fixing...
--
Pedro Alves
next prev parent reply other threads:[~2010-11-03 17:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-02 3:47 Liu, Lei
2010-11-02 8:06 ` Yao Qi
2010-11-03 1:34 ` Liu, Lei
2010-11-02 20:31 ` Tom Tromey
2010-11-03 1:41 ` Liu, Lei
2010-11-03 0:10 ` Pedro Alves
2010-11-03 2:55 ` Liu, Lei
2010-11-03 17:57 ` Pedro Alves [this message]
2010-11-04 8:51 ` Liu, Lei
2010-11-07 10:04 ` Yao Qi
2010-11-08 1:38 ` Liu, Lei
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=201011031757.10712.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=lei.liu2@windriver.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