From: Philippe Waroquiers Date: Sun, 8 Nov 2015 10:42:06 +0000 (+0000) Subject: If --history-level=full was not provided at startup, report an error in X-Git-Tag: svn/VALGRIND_3_12_0~300 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6aa9e95b75b3090d5d5c874a738fb9f247f5f63c;p=thirdparty%2Fvalgrind.git If --history-level=full was not provided at startup, report an error in 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 --- diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c index bafa78f7ad..ae6eec0abb 100644 --- a/helgrind/hg_main.c +++ b/helgrind/hg_main.c @@ -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));