This is the mail archive of the
mailing list for the GDB project.
Re: Bug in i386_process_record?
Hui Zhu wrote:
On Sun, Aug 23, 2009 at 11:07, Michael Snyder<firstname.lastname@example.org> wrote:
Hi, please *don't* check this in -- I found a problem with it.
Try running it with "set debug record 1" during the recording pass.
I see a whole lot of these:
Process record ignores the memory change of instruction at address
0x0x587be9 because it can't get the value of the segment register.
Most of the string ops instruction will use segment register.
But I check the some linux program that have string ops insn. I found
that in linux (maybe glibc), the value of the segment register is 0,
so it will not affect anything.
Hmm, ok, but this is i386-tdep.c, not i386-linux-tdep.c...
And in linux user level, looks we don't have any good way to get the
value of the segment register.
So I think this patch is OK.
I see -- so, we don't really "ignore" the memory change at all.
Isn't the message misleading, then?
What about something like:
@@ -4458,11 +4458,12 @@ reswitch:
/* addr += ((uint32_t) read_register (I386_ES_REGNUM))
<< 4; */
- if (record_debug)
- printf_unfiltered (_("Process record ignores the memory
- "of instruction at address 0x%s
- "it can't get the value of the
+ if (record_debug &&
+ read_register (I386_ES_REGNUM) != 0)
+ printf_unfiltered (_("Process record ignores value of ES "
+ "register for instruction at
address %s "
+ "because "it can't get the value of "
+ "the segment register.\n"),
paddress (gdbarch, ir.addr));
if (prefixes & (PREFIX_REPZ | PREFIX_REPNZ))