mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-30 21:34:42 +08:00
2009-08-29 Hui Zhu <teawater@gmail.com>
* i386-tdep.c (i386_process_record): Fix the error of string ops instructions's handler.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2009-08-29 Hui Zhu <teawater@gmail.com>
|
||||||
|
|
||||||
|
* i386-tdep.c (i386_process_record): Fix the error of string
|
||||||
|
ops instructions's handler.
|
||||||
|
|
||||||
2009-08-28 Doug Evans <dje@google.com>
|
2009-08-28 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
* top.c (execute_command): Remove redundant comment.
|
* top.c (execute_command): Remove redundant comment.
|
||||||
|
@ -4443,6 +4443,13 @@ reswitch:
|
|||||||
/* insS */
|
/* insS */
|
||||||
case 0x6c:
|
case 0x6c:
|
||||||
case 0x6d:
|
case 0x6d:
|
||||||
|
regcache_raw_read_unsigned (ir.regcache,
|
||||||
|
ir.regmap[X86_RECORD_RECX_REGNUM],
|
||||||
|
&tmpulongest);
|
||||||
|
if (tmpulongest)
|
||||||
|
{
|
||||||
|
ULONGEST es, ds;
|
||||||
|
|
||||||
if ((opcode & 1) == 0)
|
if ((opcode & 1) == 0)
|
||||||
ir.ot = OT_BYTE;
|
ir.ot = OT_BYTE;
|
||||||
else
|
else
|
||||||
@ -4450,43 +4457,33 @@ reswitch:
|
|||||||
regcache_raw_read_unsigned (ir.regcache,
|
regcache_raw_read_unsigned (ir.regcache,
|
||||||
ir.regmap[X86_RECORD_REDI_REGNUM],
|
ir.regmap[X86_RECORD_REDI_REGNUM],
|
||||||
&tmpulongest);
|
&tmpulongest);
|
||||||
if (!ir.aflag)
|
|
||||||
|
regcache_raw_read_unsigned (ir.regcache,
|
||||||
|
ir.regmap[X86_RECORD_ES_REGNUM],
|
||||||
|
&es);
|
||||||
|
regcache_raw_read_unsigned (ir.regcache,
|
||||||
|
ir.regmap[X86_RECORD_DS_REGNUM],
|
||||||
|
&ds);
|
||||||
|
if (ir.aflag && (es != ds))
|
||||||
{
|
{
|
||||||
tmpulongest &= 0xffff;
|
|
||||||
/* addr += ((uint32_t) read_register (I386_ES_REGNUM)) << 4; */
|
/* addr += ((uint32_t) read_register (I386_ES_REGNUM)) << 4; */
|
||||||
if (record_debug)
|
if (record_debug)
|
||||||
printf_unfiltered (_("Process record ignores the memory change "
|
printf_unfiltered (_("Process record ignores the memory "
|
||||||
"of instruction at address 0x%s because "
|
"change of instruction at address 0x%s "
|
||||||
"it can't get the value of the segment "
|
"because it can't get the value of the "
|
||||||
"register.\n"),
|
"ES segment register.\n"),
|
||||||
paddress (gdbarch, ir.addr));
|
paddress (gdbarch, ir.addr));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prefixes & (PREFIX_REPZ | PREFIX_REPNZ))
|
if (prefixes & (PREFIX_REPZ | PREFIX_REPNZ))
|
||||||
{
|
|
||||||
ULONGEST count, eflags;
|
|
||||||
regcache_raw_read_unsigned (ir.regcache,
|
|
||||||
ir.regmap[X86_RECORD_REDI_REGNUM],
|
|
||||||
&count);
|
|
||||||
if (!ir.aflag)
|
|
||||||
count &= 0xffff;
|
|
||||||
regcache_raw_read_unsigned (ir.regcache,
|
|
||||||
ir.regmap[X86_RECORD_EFLAGS_REGNUM],
|
|
||||||
&eflags);
|
|
||||||
if ((eflags >> 10) & 0x1)
|
|
||||||
tmpulongest -= (count - 1) * (1 << ir.ot);
|
|
||||||
if (record_arch_list_add_mem (tmpulongest, count * (1 << ir.ot)))
|
|
||||||
return -1;
|
|
||||||
I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_RECX_REGNUM);
|
I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_RECX_REGNUM);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (record_arch_list_add_mem (tmpulongest, 1 << ir.ot))
|
if (record_arch_list_add_mem (tmpulongest, 1 << ir.ot))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
if (opcode == 0xa4 || opcode == 0xa5)
|
if (opcode == 0xa4 || opcode == 0xa5)
|
||||||
I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_RESI_REGNUM);
|
I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_RESI_REGNUM);
|
||||||
I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_REDI_REGNUM);
|
I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_REDI_REGNUM);
|
||||||
I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_EFLAGS_REGNUM);
|
I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_EFLAGS_REGNUM);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* cmpsS */
|
/* cmpsS */
|
||||||
|
Reference in New Issue
Block a user