aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Zhu <teawater@gmail.com>2010-06-22 02:15:46 +0000
committerHui Zhu <teawater@gmail.com>2010-06-22 02:15:46 +0000
commitbb08c4320780f40a8a5210164fe5f13df795460c (patch)
treed95469f4483845828e398024973a3502bbd42c4c /gdb/linux-record.c
parent * i386-tdep.h (i386_displaced_step_copy_insn): Declare. (diff)
downloadbinutils-gdb-bb08c4320780f40a8a5210164fe5f13df795460c.tar.gz
binutils-gdb-bb08c4320780f40a8a5210164fe5f13df795460c.tar.bz2
binutils-gdb-bb08c4320780f40a8a5210164fe5f13df795460c.zip
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/linux-record.c')
-rw-r--r--gdb/linux-record.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/gdb/linux-record.c b/gdb/linux-record.c
index 1311f001d26..f07a889f671 100644
--- a/gdb/linux-record.c
+++ b/gdb/linux-record.c
@@ -695,21 +695,26 @@ record_linux_system_call (enum gdb_syscall syscall,
case gdb_sys_munmap:
{
- int q;
ULONGEST len;
regcache_raw_read_unsigned (regcache, tdep->arg1,
&tmpulongest);
regcache_raw_read_unsigned (regcache, tdep->arg2, &len);
- target_terminal_ours ();
- q = yquery (_("The next instruction is syscall munmap. "
- "It will free the memory addr = 0x%s len = %u. "
- "It will make record target get error. "
- "Do you want to stop the program?"),
- OUTPUT_REG (tmpulongest, tdep->arg1), (int) len);
- target_terminal_inferior ();
- if (q)
- return 1;
+ if (record_memory_query)
+ {
+ int q;
+
+ target_terminal_ours ();
+ q = yquery (_("\
+The next instruction is syscall munmap.\n\
+It will free the memory addr = 0x%s len = %u.\n\
+It will make record target cannot record some memory change.\n\
+Do you want to stop the program?"),
+ OUTPUT_REG (tmpulongest, tdep->arg1), (int) len);
+ target_terminal_inferior ();
+ if (q)
+ return 1;
+ }
}
break;