How to instrument a program using GCC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am trying to do some program instrumentation using GCC.
Suppose I have a C program, look like the following:
struct s {
   int x; int y;
};
foo (int a, int b) {
   struct s s;
   s.x = a+b;
   s.y = a-b;
}
I would like to instrument to program to do a value profiling of all
the variables in the program, i.e., what are the values of a, b, s.x,
s.y for test run. I think I could probably use GCC to automate the
process but I don't know how to start. Any suggestion will be
appreciated.

Thanks

Haifeng

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux