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
This commit is contained in:
parent
659cf796d3
commit
322f22f7b5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=244692
@ -36,7 +36,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <libproc.h>
|
#include <libproc.h>
|
||||||
|
|
||||||
int
|
int __noinline
|
||||||
t1_bkpt_t()
|
t1_bkpt_t()
|
||||||
{
|
{
|
||||||
printf("TEST OK\n");
|
printf("TEST OK\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user