aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2011-03-31 16:16:57 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2011-03-31 16:16:57 +0000
commitfcf250e2bae3e6053af11b2e42bd59dcd3762ab3 (patch)
treec57991fba97a9a3385a949b0fb578caeba592aed
parentee6436e3c7c6a18236ac2fb461755c2ad71df2cc (diff)
downloadgdb-fcf250e2bae3e6053af11b2e42bd59dcd3762ab3.zip
gdb-fcf250e2bae3e6053af11b2e42bd59dcd3762ab3.tar.gz
gdb-fcf250e2bae3e6053af11b2e42bd59dcd3762ab3.tar.bz2
* i386-tdep.c (i386_frame_prev_register): Unwind SP from memory
if neither saved value nor register available (e.g. signal frame).
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/i386-tdep.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f04ed01..69c44a7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2011-03-31 Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ * i386-tdep.c (i386_frame_prev_register): Unwind SP from memory
+ if neither saved value nor register available (e.g. signal frame).
+
2011-03-31 Thiago Jung Bauermann <bauerman@br.ibm.com>
* macroexp.c (expand): Avoid uninitialized variable
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index c7ad3a6..5f4089b 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -1798,12 +1798,13 @@ i386_frame_prev_register (struct frame_info *this_frame, void **this_cache,
if (regnum == I386_EIP_REGNUM && cache->pc_in_eax)
return frame_unwind_got_register (this_frame, regnum, I386_EAX_REGNUM);
- if (regnum == I386_ESP_REGNUM)
+ if (regnum == I386_ESP_REGNUM
+ && (cache->saved_sp != 0 || cache->saved_sp_reg != -1))
{
/* If the SP has been saved, but we don't know where, then this
means that SAVED_SP_REG register was found unavailable back
when we built the cache. */
- if (cache->saved_sp == 0 && cache->saved_sp_reg != -1)
+ if (cache->saved_sp == 0)
return frame_unwind_got_register (this_frame, regnum,
cache->saved_sp_reg);
else