public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/28127] New: DW_FORM_data16 support
@ 2021-07-23 14:33 vries at gcc dot gnu.org
2021-07-23 15:04 ` [Bug symtab/28127] " vries at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2021-07-23 14:33 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28127
Bug ID: 28127
Summary: DW_FORM_data16 support
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: symtab
Assignee: unassigned at sourceware dot org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
With gcc-11 and -gdwarf-5, we run into:
...
(gdb) PASS: gdb.ada/arrayptr.exp: scenario=all: ptype string_access
print pa_ptr.all^M
Unhandled dwarf expression opcode 0xff^M
(gdb) FAIL: gdb.ada/arrayptr.exp: scenario=all: print pa_ptr.all
...
What happens is that there's an upper bound:
...
<2><1509>: Abbrev Number: 12 (DW_TAG_subrange_type)
<150a> DW_AT_lower_bound : 0
<150b> DW_AT_upper_bound : 0x3fffffffffffffffff
<151b> DW_AT_name : foo__packed_array
<151f> DW_AT_type : <0x15cc>
<1523> DW_AT_artificial : 1
...
with form DW_FORM_data16:
...
12 DW_TAG_subrange_type [no children]
DW_AT_lower_bound DW_FORM_data1
DW_AT_upper_bound DW_FORM_data16
DW_AT_name DW_FORM_strp
DW_AT_type DW_FORM_ref4
DW_AT_artificial DW_FORM_flag_present
DW_AT value: 0 DW_FORM value: 0
...
and:
...
/* Return non-zero if ATTR's value falls in the 'constant' class, or
zero otherwise. When this function returns true, you can apply
the constant_value method to it.
...
DW_FORM_data16 is not considered as constant_value cannot handle
that. */
bool form_is_constant () const;
...
so instead we have:
...
bool
attribute::form_is_block () const
{
return (form == DW_FORM_block1
|| form == DW_FORM_block2
|| form == DW_FORM_block4
|| form == DW_FORM_block
|| form == DW_FORM_exprloc
|| form == DW_FORM_data16);
}
...
so in attr_to_dynamic_prop we end up doing "prop->set_locexpr (baton)" and have
a PROC_LOCEXPR instead of a PROP_CONST and end up trying to evaluate the
constant 0x3fffffffffffffffff as if it were a locexpr.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug symtab/28127] DW_FORM_data16 support
2021-07-23 14:33 [Bug symtab/28127] New: DW_FORM_data16 support vries at gcc dot gnu.org
@ 2021-07-23 15:04 ` vries at gcc dot gnu.org
2021-07-23 15:11 ` vries at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2021-07-23 15:04 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28127
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
With this:
...
$ git diff
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 029b8bfad04..8b603e8acae 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -18247,6 +18247,9 @@ attr_to_dynamic_prop (const struct attribute *attr,
struct die
_info *die,
if (attr == NULL || prop == NULL)
return 0;
+ if (attr->form == DW_FORM_data16)
+ return 0;
+
if (attr->form_is_block ())
{
baton = XOBNEW (obstack, struct dwarf2_property_baton);
...
we have:
...
(gdb) PASS: gdb.ada/arrayptr.exp: scenario=all: ptype string_access
print pa_ptr.all^M
$7 = (10, 20, 30, 40, 50, 60, 62, 63, -23, 42)^M
(gdb) PASS: gdb.ada/arrayptr.exp: scenario=all: print pa_ptr.all
...
but also with set complaints 1000:
...
During symbol reading: Unresolved DW_AT_upper_bound - DIE at 0x1528 [in module
foo]
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug symtab/28127] DW_FORM_data16 support
2021-07-23 14:33 [Bug symtab/28127] New: DW_FORM_data16 support vries at gcc dot gnu.org
2021-07-23 15:04 ` [Bug symtab/28127] " vries at gcc dot gnu.org
@ 2021-07-23 15:11 ` vries at gcc dot gnu.org
2021-07-25 7:25 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2021-07-23 15:11 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28127
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
With scenario minimal, we have initially the same error:
...
(gdb) PASS: gdb.ada/arrayptr.exp: scenario=minimal: ptype string_access
print pa_ptr.all^M
Unhandled dwarf expression opcode 0xff^M
(gdb) FAIL: gdb.ada/arrayptr.exp: scenario=minimal: print pa_ptr.all
...
but with the patch that turns into:
...
(gdb) PASS: gdb.ada/arrayptr.exp: scenario=minimal: ptype string_access
print pa_ptr.all^M
$7 = 394983413522922703370^M
(gdb) FAIL: gdb.ada/arrayptr.exp: scenario=minimal: print pa_ptr.all
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug symtab/28127] DW_FORM_data16 support
2021-07-23 14:33 [Bug symtab/28127] New: DW_FORM_data16 support vries at gcc dot gnu.org
2021-07-23 15:04 ` [Bug symtab/28127] " vries at gcc dot gnu.org
2021-07-23 15:11 ` vries at gcc dot gnu.org
@ 2021-07-25 7:25 ` vries at gcc dot gnu.org
2023-03-07 0:45 ` tromey at sourceware dot org
2023-03-07 14:10 ` tromey at sourceware dot org
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2021-07-25 7:25 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28127
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2021-July/181114.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug symtab/28127] DW_FORM_data16 support
2021-07-23 14:33 [Bug symtab/28127] New: DW_FORM_data16 support vries at gcc dot gnu.org
` (2 preceding siblings ...)
2021-07-25 7:25 ` vries at gcc dot gnu.org
@ 2023-03-07 0:45 ` tromey at sourceware dot org
2023-03-07 14:10 ` tromey at sourceware dot org
4 siblings, 0 replies; 6+ messages in thread
From: tromey at sourceware dot org @ 2023-03-07 0:45 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28127
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
--- Comment #4 from Tom Tromey <tromey at sourceware dot org> ---
For dynamic properties, this is probably a dup of the new
128-bit bug. The idea being to store the form data into
the property, but have the property accessors return a gdb_mpz.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug symtab/28127] DW_FORM_data16 support
2021-07-23 14:33 [Bug symtab/28127] New: DW_FORM_data16 support vries at gcc dot gnu.org
` (3 preceding siblings ...)
2023-03-07 0:45 ` tromey at sourceware dot org
@ 2023-03-07 14:10 ` tromey at sourceware dot org
4 siblings, 0 replies; 6+ messages in thread
From: tromey at sourceware dot org @ 2023-03-07 14:10 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28127
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://sourceware.org/bugz
| |illa/show_bug.cgi?id=30191
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-03-07 14:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23 14:33 [Bug symtab/28127] New: DW_FORM_data16 support vries at gcc dot gnu.org
2021-07-23 15:04 ` [Bug symtab/28127] " vries at gcc dot gnu.org
2021-07-23 15:11 ` vries at gcc dot gnu.org
2021-07-25 7:25 ` vries at gcc dot gnu.org
2023-03-07 0:45 ` tromey at sourceware dot org
2023-03-07 14:10 ` tromey at sourceware dot 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).