* [Bug gdb/29558] [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type)
2022-09-08 8:38 [Bug gdb/29558] New: [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type) vries at gcc dot gnu.org
@ 2022-09-08 8:38 ` vries at gcc dot gnu.org
2022-09-08 8:46 ` vries at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-08 8:38 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29558
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
See also PR17271 - "unsupported tag: DW_TAG_unspecified_type"
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/29558] [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type)
2022-09-08 8:38 [Bug gdb/29558] New: [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type) vries at gcc dot gnu.org
2022-09-08 8:38 ` [Bug gdb/29558] " vries at gcc dot gnu.org
@ 2022-09-08 8:46 ` vries at gcc dot gnu.org
2022-09-08 8:51 ` vries at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-08 8:46 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29558
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nickc at redhat dot com
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Debug info looks like:
...
Compilation Unit @ offset 0xf4:
Length: 0x35 (32-bit)
Version: 5
Unit Type: DW_UT_compile (1)
Abbrev Offset: 0xa3
Pointer Size: 8
<0><100>: Abbrev Number: 3 (DW_TAG_unspecified_type)
<0><101>: Abbrev Number: 1 (DW_TAG_compile_unit)
<102> DW_AT_stmt_list : 0x123
<106> DW_AT_low_pc : 0x4004ac
<10e> DW_AT_high_pc : 11
<10f> DW_AT_name : test2.s
<113> DW_AT_comp_dir : /home/vries/gdb_versions/devel
<117> DW_AT_producer : GNU AS 2.39.50
<11b> DW_AT_language : 32769 (MIPS assembler)
<1><11d>: Abbrev Number: 2 (DW_TAG_subprogram)
<11e> DW_AT_name : (indirect string, offset: 0x241): foo
<122> DW_AT_external : 1
<122> DW_AT_type : <0x100>
<123> DW_AT_low_pc : 0x4004ac
<12b> DW_AT_high_pc : 11
...
OK, that looks highly unregular, the DW_TAG_unspecified_type die as a top-level
DIE.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/29558] [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type)
2022-09-08 8:38 [Bug gdb/29558] New: [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type) vries at gcc dot gnu.org
2022-09-08 8:38 ` [Bug gdb/29558] " vries at gcc dot gnu.org
2022-09-08 8:46 ` vries at gcc dot gnu.org
@ 2022-09-08 8:51 ` vries at gcc dot gnu.org
2022-09-08 9:01 ` vries at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-08 8:51 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29558
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
In the dwarf-5 standard I read:
...
For each compilation unit compiled with a DWARF producer, a contribution is
made to the .debug_info section of the object file. Each such contribution
consists of a compilation unit header followed by a single DW_TAG_compile_unit
or DW_TAG_partial_unit debugging information entry, together with its children.
...
Ok, so this is in fact incorrect dwarf.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/29558] [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type)
2022-09-08 8:38 [Bug gdb/29558] New: [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type) vries at gcc dot gnu.org
` (2 preceding siblings ...)
2022-09-08 8:51 ` vries at gcc dot gnu.org
@ 2022-09-08 9:01 ` vries at gcc dot gnu.org
2022-09-08 10:45 ` vries at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-08 9:01 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29558
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #3)
> Ok, so this is in fact incorrect dwarf.
Filed gas PR29559 - "gas generated incorrect debug info (top-level
DW_TAG_unspecified_type DIE)".
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/29558] [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type)
2022-09-08 8:38 [Bug gdb/29558] New: [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type) vries at gcc dot gnu.org
` (3 preceding siblings ...)
2022-09-08 9:01 ` vries at gcc dot gnu.org
@ 2022-09-08 10:45 ` vries at gcc dot gnu.org
2022-09-08 10:45 ` vries at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-08 10:45 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29558
--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 14326
--> https://sourceware.org/bugzilla/attachment.cgi?id=14326&action=edit
Dwarf assembly test-case
Currently, this fails:
...
(gdb) PASS: gdb.dwarf2/dw2-unspecified-type.exp: p ((int (*) ()) foo) ()
p (int) foo ()^M
Invalid cast.^M
(gdb) FAIL: gdb.dwarf2/dw2-unspecified-type.exp: p (int) foo ()
...
because DW_TAG_unspecified_type is translated as void.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/29558] [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type)
2022-09-08 8:38 [Bug gdb/29558] New: [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type) vries at gcc dot gnu.org
` (4 preceding siblings ...)
2022-09-08 10:45 ` vries at gcc dot gnu.org
@ 2022-09-08 10:45 ` vries at gcc dot gnu.org
2022-09-08 12:20 ` vries at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-08 10:45 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29558
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kevinb at redhat dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/29558] [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type)
2022-09-08 8:38 [Bug gdb/29558] New: [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type) vries at gcc dot gnu.org
` (5 preceding siblings ...)
2022-09-08 10:45 ` vries at gcc dot gnu.org
@ 2022-09-08 12:20 ` vries at gcc dot gnu.org
2022-09-08 13:06 ` [Bug symtab/29558] " vries at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-08 12:20 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29558
--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #1)
> See also PR17271 - "unsupported tag: DW_TAG_unspecified_type"
I've looked now at that one, and it looks unrelated, that's the case when a
DW_TAG_unspecificed_type DIE has a name attribute.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug symtab/29558] [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type)
2022-09-08 8:38 [Bug gdb/29558] New: [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type) vries at gcc dot gnu.org
` (6 preceding siblings ...)
2022-09-08 12:20 ` vries at gcc dot gnu.org
@ 2022-09-08 13:06 ` vries at gcc dot gnu.org
2022-09-11 7:02 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-08 13:06 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29558
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|gdb |symtab
--- Comment #7 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2022-September/191753.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug symtab/29558] [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type)
2022-09-08 8:38 [Bug gdb/29558] New: [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type) vries at gcc dot gnu.org
` (7 preceding siblings ...)
2022-09-08 13:06 ` [Bug symtab/29558] " vries at gcc dot gnu.org
@ 2022-09-11 7:02 ` vries at gcc dot gnu.org
2023-01-26 17:28 ` mark at klomp dot org
2023-01-26 17:29 ` mark at klomp dot org
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-11 7:02 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29558
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
Target Milestone|--- |13.1
--- Comment #8 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=a34a90995ae7c2f0c0b79ad32d8087d507fe42db
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug symtab/29558] [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type)
2022-09-08 8:38 [Bug gdb/29558] New: [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type) vries at gcc dot gnu.org
` (8 preceding siblings ...)
2022-09-11 7:02 ` vries at gcc dot gnu.org
@ 2023-01-26 17:28 ` mark at klomp dot org
2023-01-26 17:29 ` mark at klomp dot org
10 siblings, 0 replies; 12+ messages in thread
From: mark at klomp dot org @ 2023-01-26 17:28 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29558
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at klomp dot org
--- Comment #9 from Mark Wielaard <mark at klomp dot org> ---
Created attachment 14632
--> https://sourceware.org/bugzilla/attachment.cgi?id=14632&action=edit
tests: Handle DW_TAG_unspecified_type in funcretval test
This patch just fixes the testcase to check for DW_TAG_unspecified_type as
return type.
With your test binary tests/funcretval now prints:
() _start: returns unspecified type
() main: return value location: {0x50, 0}
But maybe a better fix is for dwfl_module_return_value_location to return zero
(which technically means that the function doesn't have a return value).
Opinions?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug symtab/29558] [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type)
2022-09-08 8:38 [Bug gdb/29558] New: [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type) vries at gcc dot gnu.org
` (9 preceding siblings ...)
2023-01-26 17:28 ` mark at klomp dot org
@ 2023-01-26 17:29 ` mark at klomp dot org
10 siblings, 0 replies; 12+ messages in thread
From: mark at klomp dot org @ 2023-01-26 17:29 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29558
--- Comment #10 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Mark Wielaard from comment #9)
> Created attachment 14632 [details]
> tests: Handle DW_TAG_unspecified_type in funcretval test
>
> This patch just fixes the testcase to check for DW_TAG_unspecified_type as
> return type.
> With your test binary tests/funcretval now prints:
>
> () _start: returns unspecified type
> () main: return value location: {0x50, 0}
>
> But maybe a better fix is for dwfl_module_return_value_location to return
> zero (which technically means that the function doesn't have a return value).
>
> Opinions?
Sorry, this patch was for elfutils, specifically
https://sourceware.org/bugzilla/show_bug.cgi?id=30047 I was just looking how
gdb handled this.
Apologies.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread