Bug 411134

Summary: Allow the user to change a set of command line options during execution.
Product: [Developer tools] valgrind Reporter: Philippe Waroquiers <philippe.waroquiers>
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: wishlist CC: philippe.waroquiers
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: patch to implement dynamically changeable options
patch to implement dynamically changeable options, without whitespace changes

Description Philippe Waroquiers 2019-08-21 12:41:40 UTC
Created attachment 122275 [details]
patch to implement dynamically changeable options

The attached patch changes the command line option framework and parsing
code to allow to change (some) command line options dynamically.

Here is a summary of the new functionality (extracted from NEWS):
* It is now possible to dynamically change the value of many command
  line options while your program (or its children) are running under
  Valgrind.
  To have the list of dynamically changeable options, run
     valgrind --help-dyn-options
  You can change the options from the shell by using vgdb to launch
  the monitor command "v.clo <clo option>...".
  The same monitor command can be used from a gdb connected
  to the valgrind gdbserver.
  Your program can also change the dynamically changeable options using
  the client request VALGRIND_CLO_CHANGE(option).
Comment 1 Philippe Waroquiers 2019-08-21 13:01:50 UTC
For background info, see discussion with MariaDB developers
https://sourceforge.net/p/valgrind/mailman/message/36738630/
and a similar discussion on StackOverflow
https://stackoverflow.com/questions/57245062/suppress-leak-check-in-a-specific-forked-child
Comment 2 Julian Seward 2019-08-31 10:46:32 UTC
Created attachment 122434 [details]
patch to implement dynamically changeable options, without whitespace changes
Comment 3 Philippe Waroquiers 2019-08-31 13:16:58 UTC
Pushed as 3a803036f