Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
Part of libelf, though packages as libdw (at least in debian). This is the newer version on bfd for stack resolution.
From source; https://sourceware.org/elfutils/, "The libraries and backends are dual GPLv2+/LGPLv3+. The utilities are GPLv3+", so staying with the libraries will mean there isn't non-distributable option.
init
static char *debuginfo_path; |
static const Dwfl_Callbacks proc_callbacks = |
{
|
.find_debuginfo = dwfl_standard_find_debuginfo,
|
.debuginfo_path = &debuginfo_path,
|
|
.find_elf = dwfl_linux_proc_find_elf,
|
};
|
Dwfl *dwfl = dwfl_begin (&proc_callbacks);
|
if (dwfl == NULL) |
error (2, 0, "dwfl_begin: %s", dwfl_errmsg (-1)); |
int result = dwfl_linux_proc_report (dwfl, pid); // prints maps |
result = dwfl_linux_proc_attach (dwfl, pid, true); // other option?, there where thread based attaches |
Resolution; example addr2line.
Dwfl_Module *mod = dwfl_addrmodule (dwfl, addr);
|
Dwfl_Line *line = dwfl_module_getsrc (mod, addr);
|
src = dwfl_lineinfo (line, &addr, &lineno, &linecol, NULL, NULL)
|
Using libelf, this integrates with debuginfod (when we run a service), or just rely on distro.
Attachments
Issue Links
- relates to
-
MDEV-30861 addr2line can't find debug info files on some platforms
- Open
-
MDBF-261 Provide debuginfod service
- Open
-
MDEV-6479 stack traces in 10.1
- Closed
-
MDEV-20738 my_addr_resolve passes invalid offsets to addr2line
- Open