summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/value
diff options
context:
space:
mode:
authorDan Liew <dan@su-root.co.uk>2019-10-28 17:53:38 -0700
committerDan Liew <dan@su-root.co.uk>2019-11-14 14:04:34 -0800
commit4c39f341996cea2fd8619fc14c8c66ab567744fb (patch)
tree38c5698d7cb4d896affd71e4ec541c9859a4814e /lldb/packages/Python/lldbsuite/test/python_api/value
parentf24c3352c97b864ae6c9851949497b8f880133f6 (diff)
downloadbcm5719-llvm-4c39f341996cea2fd8619fc14c8c66ab567744fb.tar.gz
bcm5719-llvm-4c39f341996cea2fd8619fc14c8c66ab567744fb.zip
[SanitizerCommon] Print the current value of options when printing out help.
Summary: Previously it wasn't obvious what the default value of various sanitizer options were. A very close approximation of the "default values" for the options are the current value of the options at the time of printing the help output. In the case that no other options are provided then the current values are the default values (apart from `help`). ``` ASAN_OPTIONS=help=1 ./program ``` This patch causes the current option values to be printed when the `help` output is enabled. The original intention for this patch was to append `(Default: <value>)` to an option's help text. However because this is technically wrong (and misleading) I've opted to append `(Current Value: <value>)` instead. When trying to implement a way of displaying the default value of the options I tried another solution where the default value used in `*.inc` files were used to create compile time strings that where used when printing the help output. This solution was not satisfactory for several reasons: * Stringifying the default values with the preprocessor did not work very well in several cases. Some options contain boolean operators which no amount of macro expansion can get rid of. * It was much more invasive than this patch. Every sanitizer had to be changed. * The settings of `__<sanitizer>_default_options()` are ignored. For those reasons I opted for the solution in this patch. rdar://problem/42567204 Reviewers: kubamracek, yln, kcc, dvyukov, vitalybuka, cryptoad, eugenis, samsonov Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D69546
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/value')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud