From: Philippe Waroquiers Date: Thu, 5 Dec 2013 20:29:53 +0000 (+0000) Subject: Minor tweak in the vgdb instructions output by valgrind: X-Git-Tag: svn/VALGRIND_3_10_0~689 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45c11d4804375ef5302b7b2cf9d2b2348b86ed33;p=thirdparty%2Fvalgrind.git 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 git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13747 --- diff --git a/coregrind/m_gdbserver/remote-utils.c b/coregrind/m_gdbserver/remote-utils.c index ef9af9e4f4..9028288dbe 100644 --- a/coregrind/m_gdbserver/remote-utils.c +++ b/coregrind/m_gdbserver/remote-utils.c @@ -268,10 +268,10 @@ void remote_open (const HChar *name) 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 @@ void remote_open (const HChar *name) "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");