[PATCH v2] Add DW_TAG_compile_unit DIE to Dummy CUs

Tom de Vries tdevries@suse.de
Thu Apr 18 11:31:08 GMT 2024


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.



More information about the Gdb-patches mailing list