mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-12-23 03:53:43 +01:00
eh_elf: actually use eh_elf in unw_step
This commit is contained in:
parent
e0efd00acd
commit
7a3518d325
1 changed files with 11 additions and 0 deletions
|
@ -26,6 +26,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#include "unwind_i.h"
|
||||
#include "../eh_elf/eh_elf.h"
|
||||
#include <signal.h>
|
||||
|
||||
/* Recognise PLT entries such as:
|
||||
|
@ -66,6 +67,16 @@ unw_step (unw_cursor_t *cursor)
|
|||
Debug (1, "(cursor=%p, ip=0x%016lx, cfa=0x%016lx)\n",
|
||||
c, c->dwarf.ip, c->dwarf.cfa);
|
||||
|
||||
// Try eh_elf based unwinding...
|
||||
ret = eh_elf_step_cursor(&c);
|
||||
|
||||
if(ret < 0) {
|
||||
Debug(2, "eh_elf unwinding failed (%d), falling back\n", ret);
|
||||
}
|
||||
else {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Try DWARF-based unwinding... */
|
||||
c->sigcontext_format = X86_64_SCF_NONE;
|
||||
ret = dwarf_step (&c->dwarf);
|
||||
|
|
Loading…
Reference in a new issue