* [Bug tools/31085] New: Provide tool to extract path to .dwo from binary
@ 2023-11-24 20:09 sam at gentoo dot org
2024-02-09 15:48 ` [Bug tools/31085] " mark at klomp dot org
0 siblings, 1 reply; 2+ messages in thread
From: sam at gentoo dot org @ 2023-11-24 20:09 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=31085
Bug ID: 31085
Summary: Provide tool to extract path to .dwo from binary
Product: elfutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: tools
Assignee: unassigned at sourceware dot org
Reporter: sam at gentoo dot org
CC: arsen at sourceware dot org, elfutils-devel at sourceware dot org
Target Milestone: ---
It would be nice if elfutils provided a tool to find the .dwo path embedded in
a binary with gcc's -gsplit-dwarf (extract '.debug_str' to find the .dwo path).
```
echo 'int main() {}' > /tmp/foo.c
gcc /tmp/foo.c -ggdb3 -o /tmp/foo -gsplit-dwarf
```
/tmp/foo might be moved after the build (e.g. installed by the build system to
DESTDIR). I need a way to map /tmp/foo -> /tmp/foo.dwo by reading .debug_str
from /tmp/foo.
(The reason being: I might have a lot of binaries in my DESTDIR. I need to know
which of them have debug information available & where it is, so I can copy
them into the DESTDIR too in e.g. /usr/lib/debug).
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug tools/31085] Provide tool to extract path to .dwo from binary
2023-11-24 20:09 [Bug tools/31085] New: Provide tool to extract path to .dwo from binary sam at gentoo dot org
@ 2024-02-09 15:48 ` mark at klomp dot org
0 siblings, 0 replies; 2+ messages in thread
From: mark at klomp dot org @ 2024-02-09 15:48 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=31085
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at klomp dot org
--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
This might be a feature request for the debugedit project.
It seems what you want is some kind of move-debug command, which extracts the
debuginfo from an exe, puts it under some DESTDIR, then it might optionally
also move the sources that are referenced from the debuginfo and then also move
(and optionally rewrite?) any associated .dwo files.
Which is basically what the debugedit find-debuginfo script does, except for
the .dwo part.
https://sourceware.org/cgit/debugedit/tree/scripts/find-debuginfo.in
find-debuginfo also (optionally) does a couple more things, like adding
mini-debuginfo, dwz compression, providing source lists, etc.
It could even be extended to actually run dwp to collect all .dwos into a .dwp
file.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-09 15:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-24 20:09 [Bug tools/31085] New: Provide tool to extract path to .dwo from binary sam at gentoo dot org
2024-02-09 15:48 ` [Bug tools/31085] " 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).