]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix use of uninit heuristic set for monitor command
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 9 Oct 2013 20:12:39 +0000 (20:12 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 9 Oct 2013 20:12:39 +0000 (20:12 +0000)
* initialise leak_check heuristic parameter in the leak_check monitor command
* show the default value (none heuristic) in the monitor help command
  (none value chosen as default as this gives a backward compatible
   behaviour).
* document the heuristic leak check parameter in memcheck manual
  monitor command section

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

gdbserver_tests/mchelp.stdoutB.exp
memcheck/docs/mc-manual.xml
memcheck/mc_main.c

index a2918fa3eecc4e9241a1efa5f11cf5919d133d0d..c9b17299e89807ac9133b71c486b7dc13b7cbedf 100644 (file)
@@ -29,8 +29,8 @@ memcheck monitor commands:
                 [increased*|changed|any]
                 [unlimited*|limited <max_loss_records_output>]
             * = defaults
-        where kind is one of definite indirect possible reachable all none
-        where heur is one of stdstring newarray multipleinheritance all none
+       where kind is one of definite indirect possible reachable all none
+       where heur is one of stdstring newarray multipleinheritance all none*
         Examples: leak_check
                   leak_check summary any
                   leak_check full kinds indirect,possible
@@ -84,8 +84,8 @@ memcheck monitor commands:
                 [increased*|changed|any]
                 [unlimited*|limited <max_loss_records_output>]
             * = defaults
-        where kind is one of definite indirect possible reachable all none
-        where heur is one of stdstring newarray multipleinheritance all none
+       where kind is one of definite indirect possible reachable all none
+       where heur is one of stdstring newarray multipleinheritance all none*
         Examples: leak_check
                   leak_check summary any
                   leak_check full kinds indirect,possible
index 7eee0c54a01363250ba06b3b00ddaa7662f38128..4c6f862e8bfbacdd4f6be8e5216157f060f08f37 100644 (file)
@@ -1603,18 +1603,19 @@ Address 0x8049E28 len 1 defined
   <listitem>
     <para><varname>leak_check [full*|summary]
                               [kinds &lt;set&gt;|reachable|possibleleak*|definiteleak]
+                              [heuristics heur1,heur2,...]
                               [increased*|changed|any]
                               [unlimited*|limited &lt;max_loss_records_output&gt;]
           </varname>
     performs a leak check. The <varname>*</varname> in the arguments
     indicates the default values. </para>
 
-    <para> If the first argument is <varname>summary</varname>, only a
-    summary of the leak search is given; otherwise a full leak report
-    is produced.  A full leak report gives detailed information for
-    each leak: the stack trace where the leaked blocks were allocated,
-    the number of blocks leaked and their total size.  When a full
-    report is requested, the next two arguments further specify what
+    <para> If the <varname>[full*|summary]</varname> argument is
+    <varname>summary</varname>, only a summary of the leak search is given;
+    otherwise a full leak report is produced.  A full leak report gives
+    detailed information for each leak: the stack trace where the leaked blocks
+    were allocated, the number of blocks leaked and their total size.  When a
+    full report is requested, the next two arguments further specify what
     kind of leaks to report.  A leak's details are shown if they match
     both the second and third argument. A full leak report might
     output detailed information for many leaks. The nr of leaks for
@@ -1624,9 +1625,9 @@ Address 0x8049E28 len 1 defined
     search  outputs the records with the biggest number of bytes.
     </para>
 
-    <para>The second argument controls what kind of blocks are shown for
-    a <varname>full</varname> leak search.  The set of leak kinds to show
-    can be specified using a <varname>&lt;set&gt;</varname> similarly
+    <para>The <varname>kinds</varname> argument controls what kind of blocks
+    are shown for a <varname>full</varname> leak search.  The set of leak kinds
+    to show can be specified using a <varname>&lt;set&gt;</varname> similarly
     to the command line option <option>--show-leak-kinds</option>.
     Alternatively, the  value <varname>definiteleak</varname> 
     is equivalent to <varname>kinds definite</varname>, the
@@ -1638,8 +1639,16 @@ Address 0x8049E28 len 1 defined
     all</varname>).
     </para>
 
-    <para>The third argument controls what kinds of changes are shown
-    for a <varname>full</varname> leak search. The
+    <para>The <varname>heuristics</varname> argument controls the heuristics
+    used during the leak search. The set of heuristics to use can be specified
+    using a <varname>&lt;set&gt;</varname> similarly
+    to the command line option <option>--leak-check-heuristics</option>.
+    The default value for the <varname>heuristics</varname> argument is
+    <varname>heuristics none</varname>.
+    </para>
+
+    <para>The <varname>[increased*|changed|any]</varname> argument controls what
+    kinds of changes are shown for a <varname>full</varname> leak search. The
     value <varname>increased</varname> specifies that only block
     allocation stacks with an increased number of leaked bytes or
     blocks since the previous leak check should be shown.  The
index b27d42cb16daabb6fb8b6c72cdc67a53a99b71af..c3891b8270e1ff4d78efd0cf02ec639e7ec4444f 100644 (file)
@@ -5374,8 +5374,8 @@ static void print_monitor_help ( void )
 "                [increased*|changed|any]\n"
 "                [unlimited*|limited <max_loss_records_output>]\n"
 "            * = defaults\n"
-"        where kind is one of definite indirect possible reachable all none\n"
-"        where heur is one of stdstring newarray multipleinheritance all none\n"
+"       where kind is one of definite indirect possible reachable all none\n"
+"       where heur is one of stdstring newarray multipleinheritance all none*\n"
 "        Examples: leak_check\n"
 "                  leak_check summary any\n"
 "                  leak_check full kinds indirect,possible\n"
@@ -5456,7 +5456,8 @@ static Bool handle_gdb_monitor_command (ThreadId tid, HChar *req)
       
       lcp.mode               = LC_Full;
       lcp.show_leak_kinds    = R2S(Possible) | R2S(Unreached);
-      lcp.errors_for_leak_kinds = 0; /* no errors for interactive leak search. */
+      lcp.errors_for_leak_kinds = 0; // no errors for interactive leak search.
+      lcp.heuristics         = 0;
       lcp.deltamode          = LCD_Increased;
       lcp.max_loss_records_output = 999999999;
       lcp.requested_by_monitor_command = True;