Add DW_TAG_compile_unit DIE to Dummy CUs
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Testing passed
|
Commit Message
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(+)
Comments
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
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
@@ -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.