public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Is there a easy way to use the -finstrument-functions option?
@ 2011-10-25  7:15 renjunqu
  2011-10-25 13:44 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: renjunqu @ 2011-10-25  7:15 UTC (permalink / raw)
  To: gcc-help


Hello everyone:
          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???
                                                                                                 
Ren jun qu  
-- 
View this message in context: http://old.nabble.com/Is-there-a-easy-way-to-use-the--finstrument-functions-option--tp32715395p32715395.html
Sent from the gcc - Help mailing list archive at Nabble.com.

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

* Re: Is there a easy way to use the -finstrument-functions option?
  2011-10-25  7:15 Is there a easy way to use the -finstrument-functions option? renjunqu
@ 2011-10-25 13:44 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2011-10-25 13:44 UTC (permalink / raw)
  To: renjunqu; +Cc: gcc-help

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

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

end of thread, other threads:[~2011-10-25 13:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-25  7:15 Is there a easy way to use the -finstrument-functions option? renjunqu
2011-10-25 13:44 ` Ian Lance Taylor

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).