Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Remove .debug_line.dwo from gdb.dwarf2/fission-multi-cu.S
Date: Mon, 2 Nov 2020 11:26:20 +0100	[thread overview]
Message-ID: <20201102102618.GA24817@delia> (raw)

Hi,

Consider test-case gdb.dwarf2/fission-multi-cu.exp.  It produces an executable
fission-multi-cu and a dwo file fission-multi-cu.dwo.

The file fission-multi-cu.dwo contains a .debug_line.dwo section, which
according to the DWARF v5 standard is a "specialized line number table" for
type units in the .debug_info.dwo section, and contains only the directory and
filename lists.

When reading the actual .debug_line.dwo section using readelf -w, we get:
...
 The Directory Table is empty.

 The File Name Table is empty.

 No Line Number Statements.
...
So, the section does not contain any actual information.  Furthermore, no
information is required because the .debug_line.dwo section does not contain
any type units.

This is confirmed by:
- re-doing the commands listed at the start of fission-multi-cu.S, which were
  used as starting point for fission-multi-cu.S, and
- compiling the fission-multi-cu{1,2}.c files with clang -flto -g -gsplit-dwarf
In both cases, no .debug_line.dwo section is generated.

Remove the .debug_line.dwo section, to make it fit how split dwarf is actually
generated by clang.

Tested on x86_64-linux.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Remove .debug_line.dwo from gdb.dwarf2/fission-multi-cu.S

gdb/testsuite/ChangeLog:

2020-11-02  Tom de Vries  <tdevries@suse.de>

	* gdb.dwarf2/fission-multi-cu.S: Remove .debug_line.dwo section.

---
 gdb/testsuite/gdb.dwarf2/fission-multi-cu.S | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.S b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.S
index 171fa7158d..cb021d5011 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.S
+++ b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.S
@@ -311,20 +311,6 @@ main:                                   # @main
 	.byte	0                       # EOM(1)
 	.byte	0                       # EOM(2)
 	.byte	0                       # EOM(3)
-	.section	.debug_line.dwo,"",@progbits
-.Ltmp4:
-	.long	(.Ltmp5-.Ltmp4)-4
-	.short	2
-	.long	(.Ltmp6-.Ltmp4)-10
-	.byte	1
-	.byte	1
-	.byte	-5
-	.byte	14
-	.byte	1
-	.byte	0
-	.byte	0
-.Ltmp6:
-.Ltmp5:
 	.section	.debug_addr,"",@progbits
 	.quad	.Lfunc_begin0
 	.quad	.Lfunc_begin1

                 reply	other threads:[~2020-11-02 10:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20201102102618.GA24817@delia \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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