public inbox for
 help / color / mirror / Atom feed
From: "Tomar, Sourabh Singh" <>
To: "" <>,
	"" <>,
	David Blaikie <>
Cc: "Achra, Nitika" <>,
	"George, Jini Susan" <>,
	"Sharma, Alok Kumar" <>,
	"Kumar N, Bhuvanendra" <>,
	"E, Nagajyothi" <>
Subject: [DWARF5] Is debug_line.dwo parsing and handling correct in GDB
Date: Thu, 17 Jun 2021 07:57:46 +0000	[thread overview]
Message-ID: <> (raw)

Hello Everyone,

Recently while investigating I stumbled upon the
`.debug_line.dwo (AKA Specialized line table)` parsing part of the GDB.
Glancing over it, it seems like the parsing of the Specialized line table(.debug_line.dwo) is limited by the presence of type units.
However apart from type units there are other consumers of `.debug_line.dwo` such as `.debug_macro.dwo` for more context on this
front please refer to following DWARFIssue:

Coming back to present situation, the question I have is the `.debug_line.dwo` section consumptions is Okay in GDB? If so, Can somebody
provide a possible testing scenario. As of now trunk GCC((GCC) 12.0.0 20210514) does not produce type units.
Compilation tried:
$ tot-gcc -fdebug-types-section -g macro.c
$ tot-gcc -fdebug-types-section -gstrict-dwarf macro.c

If GDB consumption of `.debug_line.dwo` is Okay, then how is it managing the primary line table `.debug_line`(containing the address to line mapping) part ?
Does it parses the primary line table in a subsequent pass ? or the primary line table is parsed first then a second pass needed to accommodate information
available in Specialized line table ?

Please note: CLANG emits Specialized line table iff macro + split mode are enabled i.e
$ clang -gdwarf-5 -gsplit-dwarf  -fdebug_macro macro.c
$ llvm-readelf -S macro.dwo | egrep "debug"
  [ 2] .debug_macro.dwo  PROGBITS        0000000000000000 000040 0004f2 00   E  0   0  1
  [ 3] .debug_str_offsets.dwo PROGBITS   0000000000000000 000532 000580 00   E  0   0  1
  [ 4] .debug_str.dwo    PROGBITS        0000000000000000 000ab2 002275 01 MSE  0   0  1
  [ 5] .debug_info.dwo   PROGBITS        0000000000000000 002d27 00003e 00   E  0   0  1
  [ 6] .debug_abbrev.dwo PROGBITS        0000000000000000 002d65 00003f 00   E  0   0  1
  [ 7] .debug_line.dwo   PROGBITS        0000000000000000 002da4 000056 00   E  0   0  1

Any pointer, much appreciated!


             reply	other threads:[~2021-06-17  7:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17  7:57 Tomar, Sourabh Singh [this message]
2021-06-22 20:52 ` David Blaikie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).