public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How to instrument a program using GCC
@ 2008-02-15 23:07 Haifeng He
  2008-02-17 20:17 ` Diego Novillo
  0 siblings, 1 reply; 5+ messages in thread
From: Haifeng He @ 2008-02-15 23:07 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-19 21:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-15 23:07 How to instrument a program using GCC Haifeng He
2008-02-17 20:17 ` Diego Novillo
2008-02-19  4:12   ` Haifeng He
2008-02-19 13:38     ` Diego Novillo
2008-02-19 21:10       ` Haifeng He

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).