]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
If --history-level=full was not provided at startup, report an error in
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 8 Nov 2015 10:42:06 +0000 (10:42 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 8 Nov 2015 10:42:06 +0000 (10:42 +0000)
helgrind accesshistory monitor command

As accesshistory will never show anything unless this option is given.

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

helgrind/hg_main.c

index bafa78f7ad5d6283ea79c20516fabce76cb2d27a..ae6eec0abba56271c129945e700a7d2f8f67f5d4 100644 (file)
@@ -4988,6 +4988,12 @@ static Bool handle_gdb_monitor_command (ThreadId tid, HChar *req)
       {
          Addr address;
          SizeT szB = 1;
+         if (HG_(clo_history_level) < 2) {
+            VG_(gdb_printf)
+               ("helgrind must be started with --history-level=full"
+                " to use accesshistory\n");
+            return True;
+         }
          if (VG_(strtok_get_address_and_size) (&address, &szB, &ssaveptr)) {
             if (szB >= 1) 
                libhb_event_map_access_history (address, szB, HG_(print_access));