summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Ostapenko <m.ostapenko@samsung.com>2016-11-07 20:16:48 +0300
committerIvan Baravy <i.baravy@samsung.com>2017-02-22 12:22:11 +0300
commit393263542c58fab61f336290d465c0cb95dcbcc9 (patch)
treeef2397a1a8cdf63e433c680251d729b9879f2a1b
parente04a7c95734712661fd38aee58878b3d9e97e7e7 (diff)
downloadlinaro-gcc-393263542c58fab61f336290d465c0cb95dcbcc9.tar.gz
linaro-gcc-393263542c58fab61f336290d465c0cb95dcbcc9.tar.bz2
linaro-gcc-393263542c58fab61f336290d465c0cb95dcbcc9.zip
Support print_cmdline in LSan.
Change-Id: I65d37582e6b5c3d54f8628e96edbaf4cbfc7c337 Signed-off-by: Maxim Ostapenko <m.ostapenko@samsung.com> Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
-rw-r--r--libsanitizer/lsan/lsan_common.cc2
-rw-r--r--libsanitizer/sanitizer_common/sanitizer_flags.inc2
2 files changed, 3 insertions, 1 deletions
diff --git a/libsanitizer/lsan/lsan_common.cc b/libsanitizer/lsan/lsan_common.cc
index 1bc0a78d1da..668e2f4d5e9 100644
--- a/libsanitizer/lsan/lsan_common.cc
+++ b/libsanitizer/lsan/lsan_common.cc
@@ -439,6 +439,8 @@ static bool CheckForLeaks() {
PrintMatchedSuppressions();
if (unsuppressed_count > 0) {
param.leak_report.PrintSummary();
+ if (common_flags()->print_cmdline)
+ PrintCmdline();
return true;
}
return false;
diff --git a/libsanitizer/sanitizer_common/sanitizer_flags.inc b/libsanitizer/sanitizer_common/sanitizer_flags.inc
index 207b9fe513a..75f98ace87d 100644
--- a/libsanitizer/sanitizer_common/sanitizer_flags.inc
+++ b/libsanitizer/sanitizer_common/sanitizer_flags.inc
@@ -194,4 +194,4 @@ COMMON_FLAG(bool, suppress_equal_pcs, true,
"Deduplicate multiple reports for single source location in "
"halt_on_error=false mode (asan only).")
COMMON_FLAG(bool, print_cmdline, false, "Print command line on crash "
- "(asan and ubsan only).")
+ "(asan, ubsan and lsan only).")