This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Looking up enum constant symbols from C++ base classes
- From: Tom Tromey <tromey at redhat dot com>
- To: "Liu\, Lei" <lei dot liu2 at windriver dot com>
- Cc: gdb at sourceware dot org
- Date: Mon, 01 Nov 2010 13:12:14 -0600
- Subject: Re: Looking up enum constant symbols from C++ base classes
- References: <4CCE89F7.10908@windriver.com>
>>>>> ">" == Liu, Lei <lei.liu2@windriver.com> writes:
>> class A {
>> public:
>> enum E {X,Y,Z};
>> };
>> I tried to plant a conditional breakpoint in line 14 as shown in comment
>> but got a error shows 'No symbol "X" in current context'. The symbol
>> 'X' is accessible in that scope. It seems that gdb has a problem to look
>> up enum constant symbols derived from base classes.
Yeah.
>> I added some code in cp_lookup_symbol_nonlocal to make gdb look up symbols
>> from all base classes. It works fine. Is this a right fix?
It might be, but we'd have to see the patch to be sure.
Tom