]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdwfl: Handle unwind frame when the return address register isn't set.
authorMark Wielaard <mark@klomp.org>
Tue, 10 Apr 2018 14:13:34 +0000 (16:13 +0200)
committerMark Wielaard <mark@klomp.org>
Fri, 13 Apr 2018 11:37:16 +0000 (13:37 +0200)
commit1cc2e2265df8b0f7d97d3680e9e35124ad92a4f5
treefe93cf9e03bc3197e5a026c91773441f1d804f30
parenta46d8d5f87e42b7d61cdff671ec7d3728cd1a637
libdwfl: Handle unwind frame when the return address register isn't set.

When we have unwound the frame and then cannot set the return address
we wouldn't set any error. That meant that a dwfl_thread_getframes ()
call could end in an error, but without any dwfl_errno set, producing
the "no error" error message.

If we cannot set the return address at the end of unwinding the frame
that means that either the return address register is bogus (error),
or that the return address is undefined (end of the call stack).

This fixes the run-backtrace-native-biarch.sh testcase for me on an
i386 on x86_64 setup with gcc 7.2.1 and glibc 2.17.

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdwfl/ChangeLog
libdwfl/frame_unwind.c