diff --git a/gdbserver_tests/mchelp.stdoutB.exp b/gdbserver_tests/mchelp.stdoutB.exp index a2918fa3e..c9b17299e 100644 --- a/gdbserver_tests/mchelp.stdoutB.exp +++ b/gdbserver_tests/mchelp.stdoutB.exp @@ -29,8 +29,8 @@ memcheck monitor commands: [increased*|changed|any] [unlimited*|limited ] * = 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 ] * = 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 diff --git a/memcheck/docs/mc-manual.xml b/memcheck/docs/mc-manual.xml index 7eee0c54a..4c6f862e8 100644 --- a/memcheck/docs/mc-manual.xml +++ b/memcheck/docs/mc-manual.xml @@ -1603,18 +1603,19 @@ Address 0x8049E28 len 1 defined leak_check [full*|summary] [kinds <set>|reachable|possibleleak*|definiteleak] + [heuristics heur1,heur2,...] [increased*|changed|any] [unlimited*|limited <max_loss_records_output>] performs a leak check. The * in the arguments indicates the default values. - If the first argument is summary, 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 + If the [full*|summary] argument is + summary, 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. - The second argument controls what kind of blocks are shown for - a full leak search. The set of leak kinds to show - can be specified using a <set> similarly + The kinds argument controls what kind of blocks + are shown for a full leak search. The set of leak kinds + to show can be specified using a <set> similarly to the command line option . Alternatively, the value definiteleak is equivalent to kinds definite, the @@ -1638,8 +1639,16 @@ Address 0x8049E28 len 1 defined all). - The third argument controls what kinds of changes are shown - for a full leak search. The + The heuristics argument controls the heuristics + used during the leak search. The set of heuristics to use can be specified + using a <set> similarly + to the command line option . + The default value for the heuristics argument is + heuristics none. + + + The [increased*|changed|any] argument controls what + kinds of changes are shown for a full leak search. The value increased specifies that only block allocation stacks with an increased number of leaked bytes or blocks since the previous leak check should be shown. The diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c index b27d42cb1..c3891b827 100644 --- a/memcheck/mc_main.c +++ b/memcheck/mc_main.c @@ -5374,8 +5374,8 @@ static void print_monitor_help ( void ) " [increased*|changed|any]\n" " [unlimited*|limited ]\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;