* i386-tdep.c (i386_analyze_register_saves): Handle register saves
at the start of a frameless function. This probably fixes PR backtrace/1338.
This commit is contained in:
parent
c8d5f0d664
commit
99ab4326f1
2 changed files with 20 additions and 15 deletions
|
@ -1,3 +1,9 @@
|
|||
2003-08-18 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* i386-tdep.c (i386_analyze_register_saves): Handle register saves
|
||||
at the start of a frameless function. This probably fixes PR
|
||||
backtrace/1338.
|
||||
|
||||
2003-08-17 Michael Chastain <mec@shout.net>
|
||||
|
||||
* symfile.c (find_sym_fns): Remove special case for apollo target.
|
||||
|
|
|
@ -571,23 +571,22 @@ static CORE_ADDR
|
|||
i386_analyze_register_saves (CORE_ADDR pc, CORE_ADDR current_pc,
|
||||
struct i386_frame_cache *cache)
|
||||
{
|
||||
if (cache->locals >= 0)
|
||||
CORE_ADDR offset = 0;
|
||||
unsigned char op;
|
||||
int i;
|
||||
|
||||
if (cache->locals > 0)
|
||||
offset -= cache->locals;
|
||||
for (i = 0; i < 8 && pc < current_pc; i++)
|
||||
{
|
||||
CORE_ADDR offset;
|
||||
unsigned char op;
|
||||
int i;
|
||||
op = read_memory_unsigned_integer (pc, 1);
|
||||
if (op < 0x50 || op > 0x57)
|
||||
break;
|
||||
|
||||
offset = - 4 - cache->locals;
|
||||
for (i = 0; i < 8 && pc < current_pc; i++)
|
||||
{
|
||||
op = read_memory_unsigned_integer (pc, 1);
|
||||
if (op < 0x50 || op > 0x57)
|
||||
break;
|
||||
|
||||
cache->saved_regs[op - 0x50] = offset;
|
||||
offset -= 4;
|
||||
pc++;
|
||||
}
|
||||
offset -= 4;
|
||||
cache->saved_regs[op - 0x50] = offset;
|
||||
cache->sp_offset += 4;
|
||||
pc++;
|
||||
}
|
||||
|
||||
return pc;
|
||||
|
|
Loading…
Reference in a new issue