public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Add DW_TAG_compile_unit DIE to Dummy CUs
Date: Thu, 18 Apr 2024 11:28:35 +0000 (GMT)	[thread overview]
Message-ID: <20240418112835.4E6473858D37@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=41d5ff24c6723b87ada11c1287f50cb87f7d89e2

commit 41d5ff24c6723b87ada11c1287f50cb87f7d89e2
Author: Will Hawkins <hawkinsw@obs.cr>
Date:   Thu Apr 18 13:28:52 2024 +0200

    Add DW_TAG_compile_unit DIE to Dummy CUs
    
    Dummy CUs help detect errors and are very helpful. However, the DWARF
    spec seems to indicate the CUs need a DW_TAG_compile_unit in addition to
    the header. This patch adds that.
    
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31650
    
    Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
    Approved-By: Tom de Vries <tdevries@suse.de>
    Tested-By: Tom de Vries <tdevries@suse.de>

Diff:
---
 gdb/testsuite/lib/dwarf.exp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index c694375b534..1a97f83f8e6 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -2999,6 +2999,7 @@ namespace eval Dwarf {
     proc dummy_cu {} {
 	# Generate a CU with default options and empty body.
 	cu {label dummy_cu} {
+	  compile_unit {}
 	}
 
 	# Generate an .debug_aranges entry for the dummy CU.

                 reply	other threads:[~2024-04-18 11:28 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=20240418112835.4E6473858D37@sourceware.org \
    --to=vries@sourceware.org \
    --cc=gdb-cvs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).