diff options
author | pluknet <pluknet@FreeBSD.org> | 2012-12-26 05:11:48 +0000 |
---|---|---|
committer | pluknet <pluknet@FreeBSD.org> | 2012-12-26 05:11:48 +0000 |
commit | 55e18ebdf3e07929f1a0c7d68309e1edb2c655be (patch) | |
tree | f0115194b5081d978d990448e43b69a03bd4748b /lib/libproc | |
parent | 9b46c215ceb8be4f104159bb19e425f13aa0af0a (diff) | |
download | FreeBSD-src-55e18ebdf3e07929f1a0c7d68309e1edb2c655be.zip FreeBSD-src-55e18ebdf3e07929f1a0c7d68309e1edb2c655be.tar.gz |
Fix libproc test case to work with clang premature optimization
observed with -O2 (used by default).
Avoid function inlining for t1_bkpt_t on which we set a breakpoint.
Otherwise the address of the function is never called thus the
breakpoint never triggers.
Reported by: zont
Reviewed by: rpaulo
Diffstat (limited to 'lib/libproc')
-rw-r--r-- | lib/libproc/test/t1-bkpt/t1-bkpt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libproc/test/t1-bkpt/t1-bkpt.c b/lib/libproc/test/t1-bkpt/t1-bkpt.c index 37a9fcf..1cd4d17 100644 --- a/lib/libproc/test/t1-bkpt/t1-bkpt.c +++ b/lib/libproc/test/t1-bkpt/t1-bkpt.c @@ -36,7 +36,7 @@ #include <string.h> #include <libproc.h> -int +int __noinline t1_bkpt_t() { printf("TEST OK\n"); |