This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Looking up enum constant symbols from C++ base classes


>>>>> ">" == 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]