20 lines
610 B
Diff
20 lines
610 B
Diff
Index: gdb/i386-tdep.c
|
|
===================================================================
|
|
--- gdb/i386-tdep.c.orig
|
|
+++ gdb/i386-tdep.c
|
|
@@ -1023,11 +1023,13 @@ i386_frame_cache (struct frame_info *nex
|
|
/* 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
|