* [Bug debugedit/28728] New: Unknown DWARF DW_FORM_0x25
@ 2021-12-27 7:23 vt at altlinux dot org
2021-12-27 7:30 ` [Bug debugedit/28728] " vt at altlinux dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: vt at altlinux dot org @ 2021-12-27 7:23 UTC (permalink / raw)
To: debugedit
https://sourceware.org/bugzilla/show_bug.cgi?id=28728
Bug ID: 28728
Summary: Unknown DWARF DW_FORM_0x25
Product: debugedit
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: debugedit
Assignee: unassigned at sourceware dot org
Reporter: vt at altlinux dot org
CC: debugedit at sourceware dot org
Target Milestone: ---
Created attachment 13884
--> https://sourceware.org/bugzilla/attachment.cgi?id=13884&action=edit
Example of compiled module
When building Linux kernel with[1] CC=clang LLVM=1 and
CONFIG_DEBUG_INFO_DWARF5=y debugedit reports error when processing compiled
kernel modules, such as
debugedit:
./lib/modules/5.16.0+rc6.20211223-drm-tip-alt1/kernel/sound/usb/caiaq/snd-usb-caiaq.ko:
Unknown DWARF DW_FORM_0x25
[1] https://www.kernel.org/doc/html/latest/kbuild/llvm.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debugedit/28728] Unknown DWARF DW_FORM_0x25
2021-12-27 7:23 [Bug debugedit/28728] New: Unknown DWARF DW_FORM_0x25 vt at altlinux dot org
@ 2021-12-27 7:30 ` vt at altlinux dot org
2021-12-27 10:40 ` [Bug debugedit/28728] Unknown DWARF DW_FORM_0x25 (DW_FORM_strx) mark at klomp dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: vt at altlinux dot org @ 2021-12-27 7:30 UTC (permalink / raw)
To: debugedit
https://sourceware.org/bugzilla/show_bug.cgi?id=28728
--- Comment #1 from Vitaly Chikunov <vt at altlinux dot org> ---
Also, it seems, debugedit is unable to extract source list from such binary.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debugedit/28728] Unknown DWARF DW_FORM_0x25 (DW_FORM_strx)
2021-12-27 7:23 [Bug debugedit/28728] New: Unknown DWARF DW_FORM_0x25 vt at altlinux dot org
2021-12-27 7:30 ` [Bug debugedit/28728] " vt at altlinux dot org
@ 2021-12-27 10:40 ` mark at klomp dot org
2022-02-18 7:41 ` telans at posteo dot de
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mark at klomp dot org @ 2021-12-27 10:40 UTC (permalink / raw)
To: debugedit
https://sourceware.org/bugzilla/show_bug.cgi?id=28728
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
CC| |mark at klomp dot org
Summary|Unknown DWARF DW_FORM_0x25 |Unknown DWARF DW_FORM_0x25
| |(DW_FORM_strx)
Last reconfirmed| |2021-12-27
Ever confirmed|0 |1
--- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Vitaly Chikunov from comment #0)
> When building Linux kernel with[1] CC=clang LLVM=1 and
> CONFIG_DEBUG_INFO_DWARF5=y debugedit reports error when processing compiled
> kernel modules, such as
>
> debugedit:
> ./lib/modules/5.16.0+rc6.20211223-drm-tip-alt1/kernel/sound/usb/caiaq/snd-
> usb-caiaq.ko: Unknown DWARF DW_FORM_0x25
That is DW_FORM_strx1, which is only partially supported by debugedit. Normally
the DW_FORM_strx forms are only used when generating split DWARF (.dwo) files.
Best workaround for now is to not use DWARF5 with llvm (which isn't the default
for clang/llvm anyway).
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debugedit/28728] Unknown DWARF DW_FORM_0x25 (DW_FORM_strx)
2021-12-27 7:23 [Bug debugedit/28728] New: Unknown DWARF DW_FORM_0x25 vt at altlinux dot org
2021-12-27 7:30 ` [Bug debugedit/28728] " vt at altlinux dot org
2021-12-27 10:40 ` [Bug debugedit/28728] Unknown DWARF DW_FORM_0x25 (DW_FORM_strx) mark at klomp dot org
@ 2022-02-18 7:41 ` telans at posteo dot de
2022-02-18 7:47 ` telans at posteo dot de
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: telans at posteo dot de @ 2022-02-18 7:41 UTC (permalink / raw)
To: debugedit
https://sourceware.org/bugzilla/show_bug.cgi?id=28728
James Beddek <telans at posteo dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |telans at posteo dot de
--- Comment #3 from James Beddek <telans at posteo dot de> ---
(In reply to Mark Wielaard from comment #2)
> (In reply to Vitaly Chikunov from comment #0)
> > When building Linux kernel with[1] CC=clang LLVM=1 and
> > CONFIG_DEBUG_INFO_DWARF5=y debugedit reports error when processing compiled
> > kernel modules, such as
> >
> > debugedit:
> > ./lib/modules/5.16.0+rc6.20211223-drm-tip-alt1/kernel/sound/usb/caiaq/snd-
> > usb-caiaq.ko: Unknown DWARF DW_FORM_0x25
>
> That is DW_FORM_strx1, which is only partially supported by debugedit.
> Normally the DW_FORM_strx forms are only used when generating split DWARF
> (.dwo) files. Best workaround for now is to not use DWARF5 with llvm (which
> isn't the default for clang/llvm anyway).
DWARFv5 is now the default with the upcoming Clang 14.0.0 release:
https://github.com/llvm/llvm-project/blob/e80c52986e1bb3afa6a92c58b1cb897877923a66/clang/docs/ReleaseNotes.rst#dwarf-support-in-clang
At the moment debugedit warns for almost any binary compiled with Clang
14.0.0-rc1
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debugedit/28728] Unknown DWARF DW_FORM_0x25 (DW_FORM_strx)
2021-12-27 7:23 [Bug debugedit/28728] New: Unknown DWARF DW_FORM_0x25 vt at altlinux dot org
` (2 preceding siblings ...)
2022-02-18 7:41 ` telans at posteo dot de
@ 2022-02-18 7:47 ` telans at posteo dot de
2022-11-09 6:58 ` sam at gentoo dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: telans at posteo dot de @ 2022-02-18 7:47 UTC (permalink / raw)
To: debugedit
https://sourceware.org/bugzilla/show_bug.cgi?id=28728
--- Comment #4 from James Beddek <telans at posteo dot de> ---
Additionally from what I can tell the flags to re-enable DWARFv4, -gdwarf-4,
and -fdebug-default-version=4 do nothing to silence this issue.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debugedit/28728] Unknown DWARF DW_FORM_0x25 (DW_FORM_strx)
2021-12-27 7:23 [Bug debugedit/28728] New: Unknown DWARF DW_FORM_0x25 vt at altlinux dot org
` (3 preceding siblings ...)
2022-02-18 7:47 ` telans at posteo dot de
@ 2022-11-09 6:58 ` sam at gentoo dot org
2022-11-11 5:06 ` sam at gentoo dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sam at gentoo dot org @ 2022-11-09 6:58 UTC (permalink / raw)
To: debugedit
https://sourceware.org/bugzilla/show_bug.cgi?id=28728
--- Comment #5 from Sam James <sam at gentoo dot org> ---
(In reply to James Beddek from comment #4)
> Additionally from what I can tell the flags to re-enable DWARFv4, -gdwarf-4,
> and -fdebug-default-version=4 do nothing to silence this issue.
CC=clang CFLAGS="-gdwarf-4 -fdebug-default-version=4" ... doesn't give a
warning for me at least. This has been bugging me for a while, glad I found it.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debugedit/28728] Unknown DWARF DW_FORM_0x25 (DW_FORM_strx)
2021-12-27 7:23 [Bug debugedit/28728] New: Unknown DWARF DW_FORM_0x25 vt at altlinux dot org
` (4 preceding siblings ...)
2022-11-09 6:58 ` sam at gentoo dot org
@ 2022-11-11 5:06 ` sam at gentoo dot org
2023-09-24 18:10 ` seppo.yliolli at gmail dot com
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sam at gentoo dot org @ 2022-11-11 5:06 UTC (permalink / raw)
To: debugedit
https://sourceware.org/bugzilla/show_bug.cgi?id=28728
Sam James <sam at gentoo dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bero at lindev dot ch
--- Comment #6 from Sam James <sam at gentoo dot org> ---
*** Bug 29773 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] 10+ messages in thread
* [Bug debugedit/28728] Unknown DWARF DW_FORM_0x25 (DW_FORM_strx)
2021-12-27 7:23 [Bug debugedit/28728] New: Unknown DWARF DW_FORM_0x25 vt at altlinux dot org
` (5 preceding siblings ...)
2022-11-11 5:06 ` sam at gentoo dot org
@ 2023-09-24 18:10 ` seppo.yliolli at gmail dot com
2023-12-06 14:39 ` mark at klomp dot org
2023-12-11 14:02 ` mark at klomp dot org
8 siblings, 0 replies; 10+ messages in thread
From: seppo.yliolli at gmail dot com @ 2023-09-24 18:10 UTC (permalink / raw)
To: debugedit
https://sourceware.org/bugzilla/show_bug.cgi?id=28728
Seppo Yli-Olli <seppo.yliolli at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |seppo.yliolli at gmail dot com
--- Comment #7 from Seppo Yli-Olli <seppo.yliolli at gmail dot com> ---
This is now reproducing basically everywhere where LLVM17 clang is used. The
workaround to use DWARF4 seems quite unexpected now that DWARF5 is these days
the norm for everything.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debugedit/28728] Unknown DWARF DW_FORM_0x25 (DW_FORM_strx)
2021-12-27 7:23 [Bug debugedit/28728] New: Unknown DWARF DW_FORM_0x25 vt at altlinux dot org
` (6 preceding siblings ...)
2023-09-24 18:10 ` seppo.yliolli at gmail dot com
@ 2023-12-06 14:39 ` mark at klomp dot org
2023-12-11 14:02 ` mark at klomp dot org
8 siblings, 0 replies; 10+ messages in thread
From: mark at klomp dot org @ 2023-12-06 14:39 UTC (permalink / raw)
To: debugedit
https://sourceware.org/bugzilla/show_bug.cgi?id=28728
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #8 from Mark Wielaard <mark at klomp dot org> ---
https://inbox.sourceware.org/debugedit/20231204223100.3495057-1-mark@klomp.org/
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debugedit/28728] Unknown DWARF DW_FORM_0x25 (DW_FORM_strx)
2021-12-27 7:23 [Bug debugedit/28728] New: Unknown DWARF DW_FORM_0x25 vt at altlinux dot org
` (7 preceding siblings ...)
2023-12-06 14:39 ` mark at klomp dot org
@ 2023-12-11 14:02 ` mark at klomp dot org
8 siblings, 0 replies; 10+ messages in thread
From: mark at klomp dot org @ 2023-12-11 14:02 UTC (permalink / raw)
To: debugedit
https://sourceware.org/bugzilla/show_bug.cgi?id=28728
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #9 from Mark Wielaard <mark at klomp dot org> ---
commit 3e7aeeab4f744ad15108775685db68d3a35b0735
Author: Mark Wielaard <mark@klomp.org>
Date: Thu Mar 23 18:07:40 2023 +0100
debugedit: Add support for .debug_str_offsets (DW_FORM_strx)
In theory supporting strx .debug_str_offsets is easy, the strings in
.debug_str are just read through an indirection table. When the
strings are updated in .debug_str we just need to rewrite the
indirection table.
The tricky part is the ET_REL (object files or kernel modules)
support. Relocation reading is "global" per section and we expect to
read a relocation only once. But we need to read the
DW_AT_str_offsets_base before reading any strx form attributes. So we
read that first, then reset the relptr. And when we read from the
.debug_str_offsets section we need to save and restore the .debug_info
relptr.
* tools/debugedit.c (do_read_24): New function.
(str_offsets_base): New static variable.
(buf_read_ule24): New function.
(buf_read_ube24): Likewise.
(setup_relbuf): Handle .debug_str_offsets.
(do_read_uleb128): New function.
(do_read_str_form_relocated): Likewise.
(read_abbrev): Handle DW_FORM_strx[1234].
(edit_strp): Take the actual string form as argument.
Use do_read_str_form_relocated.
(read_dwarf5_line_entries): Pass form to edit_strp.
(edit_attributes_str_comp_dir): Take the actual string
form as argument. Use do_read_str_form_relocated.
(edit_attributes): Handle DW_FORM_strx[1234].
(edit_info): Read DW_AT_str_offsets_base first.
(update_str_offsets): New function.
(edit_dwarf2): Setup do_read_24. Call update_str_offsets.
https://sourceware.org/bugzilla/show_bug.cgi?id=28728
Signed-off-by: Mark Wielaard <mark@klomp.org>
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-12-11 14:02 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-27 7:23 [Bug debugedit/28728] New: Unknown DWARF DW_FORM_0x25 vt at altlinux dot org
2021-12-27 7:30 ` [Bug debugedit/28728] " vt at altlinux dot org
2021-12-27 10:40 ` [Bug debugedit/28728] Unknown DWARF DW_FORM_0x25 (DW_FORM_strx) mark at klomp dot org
2022-02-18 7:41 ` telans at posteo dot de
2022-02-18 7:47 ` telans at posteo dot de
2022-11-09 6:58 ` sam at gentoo dot org
2022-11-11 5:06 ` sam at gentoo dot org
2023-09-24 18:10 ` seppo.yliolli at gmail dot com
2023-12-06 14:39 ` mark at klomp dot org
2023-12-11 14:02 ` mark at klomp 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).