diff options
author | Hui Zhu <teawater@gmail.com> | 2010-06-22 02:15:46 +0000 |
---|---|---|
committer | Hui Zhu <teawater@gmail.com> | 2010-06-22 02:15:46 +0000 |
commit | bb08c4320780f40a8a5210164fe5f13df795460c (patch) | |
tree | d95469f4483845828e398024973a3502bbd42c4c /gdb/i386-tdep.c | |
parent | b55078be0adf688f7da6bc6feb6f7687dc319cc4 (diff) | |
download | gdb-bb08c4320780f40a8a5210164fe5f13df795460c.zip gdb-bb08c4320780f40a8a5210164fe5f13df795460c.tar.gz gdb-bb08c4320780f40a8a5210164fe5f13df795460c.tar.bz2 |
2010-06-22 Hui Zhu <teawater@gmail.com>
* i386-tdep.c (i386_record_lea_modrm): Change warning to query.
(i386_process_record): Ditto.
* record.c (record_memory_query): New variable.
(_initialize_record): New command "set record memory-query".
* record.h (record_memory_query): New extern.
2010-06-22 Hui Zhu <teawater@gmail.com>
* gdb.texinfo: (Process Record and Replay): Add documentation
for command "set record memory-query".
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r-- | gdb/i386-tdep.c | 97 |
1 files changed, 71 insertions, 26 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index e0f519d..435b623 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -3503,10 +3503,21 @@ i386_record_lea_modrm (struct i386_record_s *irp) if (irp->override >= 0) { - warning (_("Process record ignores the memory change " - "of instruction at address %s because it " - "can't get the value of the segment register."), - paddress (gdbarch, irp->orig_addr)); + if (record_memory_query) + { + int q; + + target_terminal_ours (); + q = yquery (_("\ +Process record ignores the memory change of instruction at address %s\n\ +because it can't get the value of the segment register.\n\ +Do you want to stop the program?"), + paddress (gdbarch, irp->orig_addr)); + target_terminal_inferior (); + if (q) + return -1; + } + return 0; } @@ -4397,11 +4408,20 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache, case 0xa3: if (ir.override >= 0) { - warning (_("Process record ignores the memory change " - "of instruction at address %s because " - "it can't get the value of the segment " - "register."), - paddress (gdbarch, ir.orig_addr)); + if (record_memory_query) + { + int q; + + target_terminal_ours (); + q = yquery (_("\ +Process record ignores the memory change of instruction at address %s\n\ +because it can't get the value of the segment register.\n\ +Do you want to stop the program?"), + paddress (gdbarch, ir.orig_addr)); + target_terminal_inferior (); + if (q) + return -1; + } } else { @@ -5078,11 +5098,20 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache, if (ir.aflag && (es != ds)) { /* addr += ((uint32_t) read_register (I386_ES_REGNUM)) << 4; */ - warning (_("Process record ignores the memory " - "change of instruction at address %s " - "because it can't get the value of the " - "ES segment register."), - paddress (gdbarch, ir.orig_addr)); + if (record_memory_query) + { + int q; + + target_terminal_ours (); + q = yquery (_("\ +Process record ignores the memory change of instruction at address %s\n\ +because it can't get the value of the segment register.\n\ +Do you want to stop the program?"), + paddress (gdbarch, ir.orig_addr)); + target_terminal_inferior (); + if (q) + return -1; + } } else { @@ -5635,12 +5664,20 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache, } if (ir.override >= 0) { - warning (_("Process record ignores the memory " - "change of instruction at " - "address %s because it can't get " - "the value of the segment " - "register."), - paddress (gdbarch, ir.orig_addr)); + if (record_memory_query) + { + int q; + + target_terminal_ours (); + q = yquery (_("\ +Process record ignores the memory change of instruction at address %s\n\ +because it can't get the value of the segment register.\n\ +Do you want to stop the program?"), + paddress (gdbarch, ir.orig_addr)); + target_terminal_inferior (); + if (q) + return -1; + } } else { @@ -5684,12 +5721,20 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache, /* sidt */ if (ir.override >= 0) { - warning (_("Process record ignores the memory " - "change of instruction at " - "address %s because it can't get " - "the value of the segment " - "register."), - paddress (gdbarch, ir.orig_addr)); + if (record_memory_query) + { + int q; + + target_terminal_ours (); + q = yquery (_("\ +Process record ignores the memory change of instruction at address %s\n\ +because it can't get the value of the segment register.\n\ +Do you want to stop the program?"), + paddress (gdbarch, ir.orig_addr)); + target_terminal_inferior (); + if (q) + return -1; + } } else { |