This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
FYI unwinder vDSO exception bugfix
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Fri, 01 Nov 2013 15:41:51 +0100
- Subject: FYI unwinder vDSO exception bugfix
Hi Mark,
just updating the reviewed off-trunk branch jankratochvil/unwindx86 with this
fix. If vDSO happened to be first in the module list it failed to unwind.
Jan
--- a/libdwfl/dwfl_frame.c
+++ b/libdwfl/dwfl_frame.c
@@ -157,6 +157,12 @@ dwfl_attach_state (Dwfl *dwfl, int machine, pid_t pid,
ebl = NULL;
for (Dwfl_Module *mod = dwfl->modulelist; mod != NULL; mod = mod->next)
{
+ /* Reading of the vDSO module may fail as /proc/PID/mem is unreadable
+ without PTRACE_ATTACH and we may not be PTRACE_ATTACH-ed now.
+ MOD would not be re-read later to unwind it when we are already
+ PTRACE_ATTACH-ed to PID. */
+ if (strncmp (mod->name, "[vdso: ", 7) == 0)
+ continue;
Dwfl_Error error = __libdwfl_module_getebl (mod);
if (error != DWFL_E_NOERROR)
continue;