20 lines
682 B
Diff
20 lines
682 B
Diff
|
Index: gdb/i386-tdep.c
|
||
|
===================================================================
|
||
|
--- gdb/i386-tdep.c.orig 2009-06-17 12:29:10.000000000 +0200
|
||
|
+++ gdb/i386-tdep.c 2009-06-17 12:36:56.000000000 +0200
|
||
|
@@ -1374,11 +1374,13 @@ i386_frame_cache (struct frame_info *thi
|
||
|
/* This will be added back below. */
|
||
|
cache->saved_regs[I386_EIP_REGNUM] -= cache->base;
|
||
|
}
|
||
|
- else
|
||
|
+ else if (cache->pc)
|
||
|
{
|
||
|
get_frame_register (this_frame, I386_ESP_REGNUM, buf);
|
||
|
cache->base = extract_unsigned_integer (buf, 4) + cache->sp_offset;
|
||
|
}
|
||
|
+ else
|
||
|
+ cache->saved_regs[I386_EBP_REGNUM] = 0;
|
||
|
}
|
||
|
|
||
|
/* Now that we have the base address for the stack frame we can
|