]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Minor tweak in the vgdb instructions output by valgrind:
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Thu, 5 Dec 2013 20:29:53 +0000 (20:29 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Thu, 5 Dec 2013 20:29:53 +0000 (20:29 +0000)
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

coregrind/m_gdbserver/remote-utils.c

index ef9af9e4f47fb7e9a7e2a439652ebb88e80d922d..9028288dbe17d0e698ac9966076f1ac37c97aba5 100644 (file)
@@ -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");