public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2] Add DW_TAG_compile_unit DIE to Dummy CUs
@ 2024-04-17 16:55 Will Hawkins
  2024-04-18 11:31 ` Tom de Vries
  0 siblings, 1 reply; 2+ messages in thread
From: Will Hawkins @ 2024-04-17 16:55 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.

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

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
---
Notes:
    v1 -> v2
      - Add proper trailer to commit message noting the Bugzilla.

 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] 2+ messages in thread

* Re: [PATCH v2] Add DW_TAG_compile_unit DIE to Dummy CUs
  2024-04-17 16:55 [PATCH v2] Add DW_TAG_compile_unit DIE to Dummy CUs Will Hawkins
@ 2024-04-18 11:31 ` Tom de Vries
  0 siblings, 0 replies; 2+ messages in thread
From: Tom de Vries @ 2024-04-18 11:31 UTC (permalink / raw)
  To: Will Hawkins, gdb-patches

On 4/17/24 18:55, 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.
> 

LGTM.

I've added tested-by and approved-by tags and pushed.

Thanks,
- Tom

> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31650
> 
> Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
> ---
> Notes:
>      v1 -> v2
>        - Add proper trailer to commit message noting the Bugzilla.
> 
>   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.


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

end of thread, other threads:[~2024-04-18 11:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 16:55 [PATCH v2] Add DW_TAG_compile_unit DIE to Dummy CUs Will Hawkins
2024-04-18 11:31 ` Tom de Vries

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