* [Bug default/24823] [dwz] Bad DW_OP_GNU_variable_value DIE
2019-01-01 0:00 [Bug default/24823] New: [dwz] Bad DW_OP_GNU_variable_value DIE vries at gcc dot gnu.org
2019-01-01 0:00 ` [Bug default/24823] " vries at gcc dot gnu.org
@ 2019-01-01 0:00 ` vries at gcc dot gnu.org
2019-01-01 0:00 ` vries at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: vries at gcc dot gnu.org @ 2019-01-01 0:00 UTC (permalink / raw)
To: dwz
https://sourceware.org/bugzilla/show_bug.cgi?id=24823
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
*** Bug 24728 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug default/24823] [dwz] Bad DW_OP_GNU_variable_value DIE
2019-01-01 0:00 [Bug default/24823] New: [dwz] Bad DW_OP_GNU_variable_value DIE vries at gcc dot gnu.org
@ 2019-01-01 0:00 ` vries at gcc dot gnu.org
2019-01-01 0:00 ` vries at gcc dot gnu.org
2019-01-01 0:00 ` vries at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: vries at gcc dot gnu.org @ 2019-01-01 0:00 UTC (permalink / raw)
To: dwz
https://sourceware.org/bugzilla/show_bug.cgi?id=24823
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/git/?p=dwz.git;a=commit;h=5f3ba3ae6054153ea9126d8ec39979e16a430e69
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug default/24823] New: [dwz] Bad DW_OP_GNU_variable_value DIE
@ 2019-01-01 0:00 vries at gcc dot gnu.org
2019-01-01 0:00 ` [Bug default/24823] " vries at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: vries at gcc dot gnu.org @ 2019-01-01 0:00 UTC (permalink / raw)
To: dwz
https://sourceware.org/bugzilla/show_bug.cgi?id=24823
Bug ID: 24823
Summary: [dwz] Bad DW_OP_GNU_variable_value DIE
Product: dwz
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: default
Assignee: nobody at sourceware dot org
Reporter: vries at gcc dot gnu.org
CC: dwz at sourceware dot org
Target Milestone: ---
[ Spinoff of PR24728 - "varval FAILs with cc-with-dwz-m" ]
With the gdb.dwarf2/varval.exp test-case of gdb, we have:
...
$ gdb -q -batch varval -ex start -ex "print constval"
Temporary breakpoint 1 at 0x4004ab
Temporary breakpoint 1, 0x00000000004004ab in main ()
Bad DW_OP_GNU_variable_value DIE.
...
In the original exec we have a DIE with DW_OP_GNU_variable_value ref to DIE
0x112:
...
<1><112>: Abbrev Number: 8 (DW_TAG_variable)
<113> DW_AT_name : var_c
<119> DW_AT_type : <0xd4>
<11d> DW_AT_external : 1
<11e> DW_AT_const_value : 53
...
<2><1f7>: Abbrev Number: 25 (DW_TAG_variable)
<1f8> DW_AT_name : constval
<201> DW_AT_type : <0xd4>
<205> DW_AT_location : 6 byte block: fd 12 1 0 0 9f
(DW_OP_GNU_variable_value: <0x112>; DW_OP_stack_value)
...
but after dwz -m we have moved var_c to the multifile:
...
<1><86>: Abbrev Number: 1 (DW_TAG_variable)
<87> DW_AT_name : var_c
<8d> DW_AT_type : <0x7a>
<8e> DW_AT_external : 1
<8f> DW_AT_const_value : 53
...
while constval has not, and now has an invalid DW_OP_GNU_variable_value ref:
...
<2><159>: Abbrev Number: 18 (DW_TAG_variable)
<15a> DW_AT_name : constval
<163> DW_AT_type : <alt 0x7a>
<167> DW_AT_location : 6 byte block: fd 4 0 0 0 9f
(DW_OP_GNU_variable_value: <0x4>; DW_OP_stack_value)
...
So this is a dwz bug rather than a gdb bug.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug default/24823] [dwz] Bad DW_OP_GNU_variable_value DIE
2019-01-01 0:00 [Bug default/24823] New: [dwz] Bad DW_OP_GNU_variable_value DIE vries at gcc dot gnu.org
2019-01-01 0:00 ` [Bug default/24823] " vries at gcc dot gnu.org
2019-01-01 0:00 ` vries at gcc dot gnu.org
@ 2019-01-01 0:00 ` vries at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: vries at gcc dot gnu.org @ 2019-01-01 0:00 UTC (permalink / raw)
To: dwz
https://sourceware.org/bugzilla/show_bug.cgi?id=24823
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at redhat dot com,
| |mark at klomp dot org
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Given that the DW_OP_GNU_variable_value is similar to DW_FORM_ref_addr, and
does normally not point into other files ( the exception being some old ada
compiler, see http://eagercon.com/dwarf/issues/010322-2.htm ), there's no way
to reach the multifile from the original file.
So the fix is to forbid DW_OP_GNU_variable_value-referenced DIEs to move to the
multifile:
...
diff --git a/dwz.c b/dwz.c
index e5de164..577ea2c 100644
--- a/dwz.c
+++ b/dwz.c
@@ -1596,6 +1596,7 @@ read_exprloc (DSO *dso, dw_die_ref die, unsigned char
*ptr, size_t len,
dso->filename, get_DW_OP_str (op));
return 1;
}
+ ref->die_no_multifile = 1;
if (unlikely (low_mem))
{
ref->die_referenced = 1;
...
[ AFAIU, the DIEs could move together to the multifile, but I don't know of any
current mechanism to enforce two DIEs to be either both moved to the multifile,
or both not moved to the multifile. ]
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-19 12:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01 0:00 [Bug default/24823] New: [dwz] Bad DW_OP_GNU_variable_value DIE vries at gcc dot gnu.org
2019-01-01 0:00 ` [Bug default/24823] " vries at gcc dot gnu.org
2019-01-01 0:00 ` vries at gcc dot gnu.org
2019-01-01 0:00 ` vries at gcc dot gnu.org
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).