This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Differences between Gold-produced gdb-index and GDB-produced gdb-index
- From: Sterling Augustine <saugustine at google dot com>
- To: gdb at sourceware dot org
- Date: Wed, 5 Oct 2011 12:07:24 -0700
- Subject: Differences between Gold-produced gdb-index and GDB-produced gdb-index
[Resend now that tromey is back.]
Hi All,
gdb_index handles enumerator names inconsistently. It includes the
enum's name as part of the enumerator name, but only when it is
declared inside a namespace. When outside of a namespace, it leaves
the enumerator name out:
enum A { A_A };
enum A a = A_A;
namespace foo
{
enum B { B_B };
enum B b = B_B;
};
int main() {return 0;}
For this testcase, gdb index will include (among others):
A_A
foo::B::B_B
That seems wrong to me. Which is right? FWIW, Gold includes the enum
name in both cases.
Sterling