From: "Haifeng He" <hehaifeng2nd@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: How to instrument a program using GCC
Date: Fri, 15 Feb 2008 23:07:00 -0000 [thread overview]
Message-ID: <ab08258e0802151506t24ddae6du1a48b6be6768b8ae@mail.gmail.com> (raw)
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
next reply other threads:[~2008-02-15 23:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-15 23:07 Haifeng He [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ab08258e0802151506t24ddae6du1a48b6be6768b8ae@mail.gmail.com \
--to=hehaifeng2nd@gmail.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).