public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Add DW_TAG_compile_unit DIE to Dummy CUs
@ 2024-04-17 14:51 Will Hawkins
  2024-04-17 14:55 ` Simon Marchi
  0 siblings, 1 reply; 3+ messages in thread
From: Will Hawkins @ 2024-04-17 14:51 UTC (permalink / raw)
  To: gdb-patches; +Cc: Will Hawkins

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.

See
https://sourceware.org/bugzilla/show_bug.cgi?id=31650

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
---
 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.
-- 
2.44.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add DW_TAG_compile_unit DIE to Dummy CUs
  2024-04-17 14:51 [PATCH] Add DW_TAG_compile_unit DIE to Dummy CUs Will Hawkins
@ 2024-04-17 14:55 ` Simon Marchi
  2024-04-17 15:21   ` Will Hawkins
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2024-04-17 14:55 UTC (permalink / raw)
  To: Will Hawkins, gdb-patches



On 2024-04-17 10:51, Will Hawkins wrote:
> 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.
> 
> See
> https://sourceware.org/bugzilla/show_bug.cgi?id=31650

Write this as a git trailer:

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31650

The patch seems fine to me, but I'll let Tom de Vries check it, since he
wrote that code.

Simon

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add DW_TAG_compile_unit DIE to Dummy CUs
  2024-04-17 14:55 ` Simon Marchi
@ 2024-04-17 15:21   ` Will Hawkins
  0 siblings, 0 replies; 3+ messages in thread
From: Will Hawkins @ 2024-04-17 15:21 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches

On Wed, Apr 17, 2024 at 10:55 AM Simon Marchi <simark@simark.ca> wrote:
>
>
>
> On 2024-04-17 10:51, Will Hawkins wrote:
> > 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.
> >
> > See
> > https://sourceware.org/bugzilla/show_bug.cgi?id=31650
>
> Write this as a git trailer:
>
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31650
>

Thank you! I will spin a v2! I appreciate the correction!

> The patch seems fine to me, but I'll let Tom de Vries check it, since he
> wrote that code.
>
> Simon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-17 15:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 14:51 [PATCH] Add DW_TAG_compile_unit DIE to Dummy CUs Will Hawkins
2024-04-17 14:55 ` Simon Marchi
2024-04-17 15:21   ` Will Hawkins

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).