]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Ensure the 'too early msg to use vgdb stop at valgrind abnormal exit' is produced
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 27 Nov 2016 10:25:15 +0000 (10:25 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 27 Nov 2016 10:25:15 +0000 (10:25 +0000)
For this, we must directly check the command line option, as
the VG_(gdbserver_stop_at) function returns False if the gdbserver
is not yet initialised

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16157

coregrind/m_libcassert.c

index 4e666c9fe4f4056cf2e13388aa6c7c8fd2b25ad9..ba09f2d82b4263bf3b8a1fd7f85bcd2f75c72e44 100644 (file)
@@ -264,13 +264,14 @@ static void exit_wrk( Int status, Bool gdbserver_call_allowed)
    if (gdbserver_call_allowed && !exit_called) {
       const ThreadId atid = 1; // Arbitrary tid used to call/terminate gdbsrv.
       exit_called = True;
-      if (status != 0 && VG_(gdbserver_stop_at) (VgdbStopAt_ValgrindAbExit)) {
+      if (status != 0 
+          && VgdbStopAtiS(VgdbStopAt_ValgrindAbExit, VG_(clo_vgdb_stop_at))) {
          if (VG_(gdbserver_init_done)()) {
             VG_(umsg)("(action at valgrind abnormal exit) vgdb me ... \n");
             VG_(gdbserver) (atid);
          } else {
-            VG_(umsg)("(action at valgrind abnormal exit) "
-                      "Early valgrind exit : vgdb not yet usable\n");
+            VG_(umsg)("(action at valgrind abnormal exit)\n"
+                      "valgrind exit is too early => vgdb not yet usable\n");
          }
       }
       if (VG_(gdbserver_init_done)()) {