Fix problem finding if in a signal handler. am: 1b47da733e
am: b9d4549100
Change-Id: I8e3542d04c42e3d22cd7c2b2ca216c52d3c14cc6
diff --git a/src/x86/Gos-linux.c b/src/x86/Gos-linux.c
index 884c7fd..66440ae 100644
--- a/src/x86/Gos-linux.c
+++ b/src/x86/Gos-linux.c
@@ -57,6 +57,10 @@
if SA_SIGINFO is specified.
*/
ip = c->dwarf.ip;
+ if (c->dwarf.frame != 0) {
+ /* Need to adjust the ip because we adjusted it down in the step call. */
+ ip++;
+ }
if ((*a->access_mem) (as, ip, &w0, 0, arg) < 0
|| (*a->access_mem) (as, ip + 4, &w1, 0, arg) < 0)
ret = 0;
diff --git a/src/x86/Gstep.c b/src/x86/Gstep.c
index b037b71..74fd32d 100644
--- a/src/x86/Gstep.c
+++ b/src/x86/Gstep.c
@@ -115,6 +115,10 @@
}
else
c->dwarf.ip = 0;
+
+ /* Adjust the return value because the functions above return zero for success. */
+ if (ret == 0)
+ ret = 1;
}
#endif