Make DW_TAG_enumerator's consistent, regardless of containing scope
Sterling Augustine
saugustine@google.com
Mon Oct 10 22:21:00 GMT 2011
On Fri, Oct 7, 2011 at 4:42 PM, Keith Seitz <keiths@redhat.com> wrote:
> On 10/07/2011 02:26 PM, Sterling Augustine wrote:
>>
>> saugustine@sterling$ g++ -g enum0_main.cc enum0.cc -o enum-namespace
>> saugustine@sterling$ gdb ./enum-namespace
>> GNU gdb (GDB) 7.3.50.20111007-cvs
>> ...
>> (gdb) p foo::B_B
>> No symbol "B_B" in namespace "foo".
>> (gdb) p foo::B::B_B
>> `foo::B' is not defined as an aggregate type.
>
> First things first: this is going to need a test case.
Enclosed please find the same patch, only this time with a test case.
> I've tried to reproduce this, but I cannot seem to replicate using your
> instructions:
>
To recap: be sure to compile it like so:
g++ namespace-enum-main.cc namespace-enum.cc -g
The order of the source files matters.
OK to commit?
Sterling
gdb/ChangeLog
2011-10-07 Sterling Augustine <saugustine@google.com>
* dwarf2read.c (partial_die_parent_scope): Rearrange conditional logic.
gdb/testsuite/gdb.cp/ChangeLog
2011-10-10 Sterling Augustine <saugustine@google.com>
* gdb.cp/Makefile.in: Add namespace-enum test.
* gdb.cp/namespace-enum.exp: New file.
* gdb.cp/namespace-enum.c: New file.
* gdb.cp/namespace-enum-main.c: New file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: enumerator-patch
Type: application/octet-stream
Size: 5156 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20111010/cec34aff/attachment.obj>
More information about the Gdb-patches
mailing list