Re: [PATCH] call cp_lookup_symbol_namespace recursively to search symbols in C++ base classes

Pedro Alves
2010-11-03T17:57:20Z

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