This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Query regarding new dwarf type support in gdb


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]