public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Differences between gdb-index as generated by Gold and GDB itself
@ 2011-09-26 16:50 Sterling Augustine
  2011-09-26 22:09 ` Cary Coutant
  2011-10-05 19:01 ` Tom Tromey
  0 siblings, 2 replies; 3+ messages in thread
From: Sterling Augustine @ 2011-09-26 16:50 UTC (permalink / raw)
  To: gdb

Hi All,

I have noticed an inconsistency with GDB index and the names of
enumerated values. Consider this test case:

enum A {   A_A };
enum A a = A_A;

namespace foo {
enum B {  B_B };

enum B b = B_B;
};

int main() { return 0; }

Examining the gdb-index--as produced by GDB--shows an inconsistency
between enumerator names inside a namespace vs outside the namespace:

foo::B::B_B
vs
B_B

That is, the enumerator inside the namespace includes the enum name,
but the enumerator outside the namespace doesn't include the enum
name. Is this a bug in GDB?

The index produced by gold does include the enumerator name, and is
therefore inconsistent with GDB--I'm happy to fix one or the other,
but I'm not sure which one is right.

Sterling

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Differences between gdb-index as generated by Gold and GDB itself
  2011-09-26 16:50 Differences between gdb-index as generated by Gold and GDB itself Sterling Augustine
@ 2011-09-26 22:09 ` Cary Coutant
  2011-10-05 19:01 ` Tom Tromey
  1 sibling, 0 replies; 3+ messages in thread
From: Cary Coutant @ 2011-09-26 22:09 UTC (permalink / raw)
  To: Sterling Augustine; +Cc: gdb

> Examining the gdb-index--as produced by GDB--shows an inconsistency
> between enumerator names inside a namespace vs outside the namespace:
>
> foo::B::B_B
> vs
> B_B

You mean:

foo::B::B_B
vs.
A_A

Right?

> That is, the enumerator inside the namespace includes the enum name,
> but the enumerator outside the namespace doesn't include the enum
> name. Is this a bug in GDB?

-cary

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Differences between gdb-index as generated by Gold and GDB itself
  2011-09-26 16:50 Differences between gdb-index as generated by Gold and GDB itself Sterling Augustine
  2011-09-26 22:09 ` Cary Coutant
@ 2011-10-05 19:01 ` Tom Tromey
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2011-10-05 19:01 UTC (permalink / raw)
  To: Sterling Augustine; +Cc: gdb

>>>>> "Sterling" == Sterling Augustine <saugustine@google.com> writes:

Sterling> That is, the enumerator inside the namespace includes the enum name,
Sterling> but the enumerator outside the namespace doesn't include the enum
Sterling> name. Is this a bug in GDB?

I think so.

Sterling> The index produced by gold does include the enumerator name, and is
Sterling> therefore inconsistent with GDB--I'm happy to fix one or the other,
Sterling> but I'm not sure which one is right.

I think the name of the enumerator should not contain the name of the
enum.

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-05 19:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-26 16:50 Differences between gdb-index as generated by Gold and GDB itself Sterling Augustine
2011-09-26 22:09 ` Cary Coutant
2011-10-05 19:01 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).