public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: renjunqu <renjunqu@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Is there a easy way to use the -finstrument-functions option?
Date: Tue, 25 Oct 2011 13:44:00 -0000	[thread overview]
Message-ID: <mcr1uu1faoi.fsf@dhcp-172-18-216-180.mtv.corp.google.com> (raw)
In-Reply-To: <32715395.post@talk.nabble.com> (renjunqu@gmail.com's message of	"Tue, 25 Oct 2011 00:15:41 -0700 (PDT)")

renjunqu <renjunqu@gmail.com> writes:

>           I want use gcc's "-finstrument-functions" option to hack a
> open-source project. But if i want to make the most use of this option, i
> should tell the compiler the my own definition of "__cyg_profile_func_enter"
> and "__cyg_profile_func_exit" functions. If the project i want to hack will
> create many different 'elf' files,and different 'elf' use different source
> files,so i have to define the two function in many many files.
>           Is there some easy ways to tell the compiler my function's
> definition???

I don't understand why you have to define the functions in many files.
Why can't you just define them once as globally visible functions?

Ian

      reply	other threads:[~2011-10-25 13:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-25  7:15 renjunqu
2011-10-25 13:44 ` Ian Lance Taylor [this message]

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=mcr1uu1faoi.fsf@dhcp-172-18-216-180.mtv.corp.google.com \
    --to=iant@google.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=renjunqu@gmail.com \
    /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).