This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Query regarding new dwarf type support in gdb
- From: Tom Tromey <tromey at redhat dot com>
- To: "Saraswati\, Sujoy \(JCTL-MCBS\)" <sujoy dot saraswati at hp dot com>
- Cc: "gdb\ at sourceware dot org" <gdb at sourceware dot org>
- Date: Thu, 18 Oct 2012 15:09:01 -0600
- Subject: Re: Query regarding new dwarf type support in gdb
- References: <5379BA8D7E9D7E4D87BF6749A92854C239425B12@G2W2431.americas.hpqcorp.net>
>>>>> "Sujoy" == Saraswati, Sujoy (JCTL-MCBS) <sujoy.saraswati@hp.com> writes:
Sujoy> I have a question on new dwarf type supports in gdb. For example,
Sujoy> http://dwarfstd.org/ShowIssue.php?issue=090106.1&type=closed3 talks
Sujoy> about a new DWARF tag DW_TAG_rvalue_reference_type to be added for
Sujoy> debugging C++0x R-Value references. My question is, when the compilers
Sujoy> start emitting this new tag in the debug sections, how does the older
Sujoy> gdb handle it ? Does it gracefully skip this unknown type, or does it
Sujoy> error out ? The dwarf2read.c file in gdb has many instances when
Sujoy> error() is called. My understanding is that if gdb calls error() while
Sujoy> processing the dwarf information for a module, the dwarf processing
Sujoy> would be incomplete and debugging might get affected.
I think gdb should issue a complaint (try "set complaints 1000") and
then make a new TYPE_CODE_ERROR type.
IIRC, g++ already emis rvalue references, but gdb doesn't handle them yet.
You can see this in action by digging around in libstdc++, or maybe
using gdb with complaints enabled and "file -readnow ...".
We try to avoid calling 'error' during DWARF reading (not with complete
success) since it tends to discard the whole file's debuginfo -- much
too big a hammer. This area could use some fixes.
Tom