gdb对tracepoint的描述
In some applications, it is not feasible for the debugger to interrupt
the program's execution long enough for the developer to learn anything
helpful about its behavior. If the program's correctness depends on
its real-time behavior, delays introduced by a debugger might cause the
program to change its behavior drastically, or perhaps fail, even when
the code itself is correct. It is useful to be able to observe the
program's behavior without interrupting it.
I.demo
i.tracepoint.c
#include <stdio.h>
#include <unistd.h>
int indx;
int main(int argc, char *argv[])
{
int res;
indx = 0;
while ( indx < 10000 ) {
res = indx * 2;
printf("%d\n", res);
sleep(1);
indx++;
}
return 0;
}
ii.Makefile