|
From: <sv...@va...> - 2013-12-05 20:30:03
|
Author: philippe
Date: Thu Dec 5 20:29:53 2013
New Revision: 13747
Log:
Minor tweak in the vgdb instructions output by valgrind:
to make copy/paste and then editing the command easier,
put the --pid=3393 at the end of the instruction output by valgrind.
So, in gdb command history, one can just recuperate the previous target
command in the history and more easily change the pid.
I.e. have:
target remote | /home/philippe/valgrind/refactor_vgdb/Inst/lib/valgrind/../../bin/vgdb --vgdb-prefix=truc --pid=3393
instead of
target remote | /home/philippe/valgrind/refactor_vgdb/Inst/lib/valgrind/../../bin/vgdb --pid=3393 --vgdb-prefix=truc
Modified:
trunk/coregrind/m_gdbserver/remote-utils.c
Modified: trunk/coregrind/m_gdbserver/remote-utils.c
==============================================================================
--- trunk/coregrind/m_gdbserver/remote-utils.c (original)
+++ trunk/coregrind/m_gdbserver/remote-utils.c Thu Dec 5 20:29:53 2013
@@ -268,10 +268,10 @@
VG_(umsg)("TO CONTROL THIS PROCESS USING vgdb (which you probably\n"
"don't want to do, unless you know exactly what you're doing,\n"
"or are doing some strange experiment):\n"
- " %s/../../bin/vgdb --pid=%d%s%s ...command...\n",
- VG_(libdir),
- pid, (name_default ? "" : " --vgdb-prefix="),
- (name_default ? "" : name));
+ " %s/../../bin/vgdb%s%s --pid=%d ...command...\n",
+ VG_(libdir), (name_default ? "" : " --vgdb-prefix="),
+ (name_default ? "" : name),
+ pid);
}
if (VG_(clo_verbosity) > 1
|| VG_(clo_vgdb_error) < 999999999) {
@@ -280,11 +280,11 @@
"TO DEBUG THIS PROCESS USING GDB: start GDB like this\n"
" /path/to/gdb %s\n"
"and then give GDB the following command\n"
- " target remote | %s/../../bin/vgdb --pid=%d%s%s\n",
+ " target remote | %s/../../bin/vgdb%s%s --pid=%d\n",
VG_(args_the_exename),
- VG_(libdir),
- pid, (name_default ? "" : " --vgdb-prefix="),
- (name_default ? "" : name)
+ VG_(libdir), (name_default ? "" : " --vgdb-prefix="),
+ (name_default ? "" : name),
+ pid
);
VG_(umsg)("--pid is optional if only one valgrind process is running\n");
VG_(umsg)("\n");
|