* [committed][gdb/testsuite] Use DW_FORM_ref_addr in gdb.dwarf2/enqueued-cu-base-addr.exp
@ 2021-02-08 14:23 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2021-02-08 14:23 UTC (permalink / raw)
To: gdb-patches
Hi,
When running test-case gdb.dwarf2/enqueued-cu-base-addr.exp with target board
cc-with-dwz, I get:
...
gdb compile failed, dwz: enqueued-cu-base-addr: \
Couldn't find DIE at [100] referenced by DW_AT_type from DIE at [d8]
...
At 0xd8 we have DIE:
...
<1><d8>: Abbrev Number: 3 (DW_TAG_variable)
<d9> DW_AT_name : foo
<dd> DW_AT_type : <0x100>
<e1> DW_AT_const_value : 1
...
referring to:
...
<1><100>: Abbrev Number: 3 (DW_TAG_base_type)
<101> DW_AT_byte_size : 4
<102> DW_AT_encoding : 5 (signed)
<103> DW_AT_name : int
...
The reference is inter-CU, but the used abbrev uses DW_FORM_ref4:
...
3 DW_TAG_variable [no children]
DW_AT_name DW_FORM_string
DW_AT_type DW_FORM_ref4
DW_AT_const_value DW_FORM_sdata
DW_AT value: 0 DW_FORM value: 0
...
which is for intra-CU references.
Fix this by using a '%' instead of a ':' label prefix in the dwarf assembly.
Tested on x86_64-linux.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Use DW_FORM_ref_addr in gdb.dwarf2/enqueued-cu-base-addr.exp
gdb/testsuite/ChangeLog:
2021-02-08 Tom de Vries <tdevries@suse.de>
* gdb.dwarf2/enqueued-cu-base-addr.exp: Fix inter-CU reference.
---
gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp b/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp
index 2b93bc87feb..3cf6b079908 100644
--- a/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp
+++ b/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp
@@ -50,7 +50,7 @@ Dwarf::assemble $asm_file {
} {
DW_TAG_variable {
{name foo}
- {type :$int_label}
+ {type %$int_label}
{const_value 1 DW_FORM_sdata}
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-08 14:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08 14:23 [committed][gdb/testsuite] Use DW_FORM_ref_addr in gdb.dwarf2/enqueued-cu-base-addr.exp 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