* Query regarding new dwarf type support in gdb
@ 2012-10-18 9:29 Saraswati, Sujoy (JCTL-MCBS)
2012-10-18 21:09 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Saraswati, Sujoy (JCTL-MCBS) @ 2012-10-18 9:29 UTC (permalink / raw)
To: gdb
Hi all,
I have a question on new dwarf type supports in gdb. For example, http://dwarfstd.org/ShowIssue.php?issue=090106.1&type=closed3 talks about a new DWARF tag DW_TAG_rvalue_reference_type to be added for debugging C++0x R-Value references. My question is, when the compilers start emitting this new tag in the debug sections, how does the older gdb handle it ? Does it gracefully skip this unknown type, or does it error out ? The dwarf2read.c file in gdb has many instances when error() is called. My understanding is that if gdb calls error() while processing the dwarf information for a module, the dwarf processing would be incomplete and debugging might get affected.
Regards,
Sujoy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Query regarding new dwarf type support in gdb
2012-10-18 9:29 Query regarding new dwarf type support in gdb Saraswati, Sujoy (JCTL-MCBS)
@ 2012-10-18 21:09 ` Tom Tromey
2012-10-19 10:55 ` Saraswati, Sujoy (JCTL-MCBS)
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2012-10-18 21:09 UTC (permalink / raw)
To: Saraswati, Sujoy (JCTL-MCBS); +Cc: 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Query regarding new dwarf type support in gdb
2012-10-18 21:09 ` Tom Tromey
@ 2012-10-19 10:55 ` Saraswati, Sujoy (JCTL-MCBS)
2012-10-19 17:17 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Saraswati, Sujoy (JCTL-MCBS) @ 2012-10-19 10:55 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb
Hi Tom,
Thanks for your reply. I have some further comment below -
> 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 ...".
Ok, I could check the behavior. In general, is there any place where I can check for current debug support of FSF gdb for C++11 features ?
> 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.
Yes, I agree. It would be good if we could continue reading the rest of the debug information from the file even if we face an unknown type.
Regards,
Sujoy
> Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Query regarding new dwarf type support in gdb
2012-10-19 10:55 ` Saraswati, Sujoy (JCTL-MCBS)
@ 2012-10-19 17:17 ` Tom Tromey
0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2012-10-19 17:17 UTC (permalink / raw)
To: Saraswati, Sujoy (JCTL-MCBS); +Cc: gdb
>>>>> "Sujoy" == Saraswati, Sujoy (JCTL-MCBS) <sujoy.saraswati@hp.com> writes:
Sujoy> Ok, I could check the behavior. In general, is there any place where I
Sujoy> can check for current debug support of FSF gdb for C++11 features ?
Just searching around in gdb/dwarf2read.c; and somtimes other dwarf*.c
files.
Sujoy> Yes, I agree. It would be good if we could continue reading the rest
Sujoy> of the debug information from the file even if we face an unknown
Sujoy> type.
I think this specific case should work ok.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-10-19 17:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-18 9:29 Query regarding new dwarf type support in gdb Saraswati, Sujoy (JCTL-MCBS)
2012-10-18 21:09 ` Tom Tromey
2012-10-19 10:55 ` Saraswati, Sujoy (JCTL-MCBS)
2012-10-19 17:17 ` 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).