Re: Insert Code Into Every Function
Re: Insert Code Into Every Function
- Subject: Re: Insert Code Into Every Function
- From: j o a r <email@hidden>
- Date: Sat, 15 Mar 2008 00:25:53 -0700
Dave,
Perhaps something that could be solved using DTrace?
j o a r
On Mar 14, 2008, at 11:48 PM, Dave Keck wrote:
I've got some simple assembly code that I'd like to insert into every
function of a C & Objective-C application at compile time. It's for my
own purposes of helping identify bugs, profiling, flow control, etc.
and it may develop into a larger public project. I've done extensive
research into projects that accomplish similar tasks (Gprof and other
projects) but none of them do what I need to, so I'm prepared to do it
myself.
Right now it looks as if I'm going to be taking a not-so-elegant
approach of using regular expressions to identify the functions in a
source file, and manually inserting the assembly code into the C &
Objective-C functions using an Xcode build phase prior to compilation.
Before I start on this time-consuming tangent, does anyone have any
suggestions as far as more elegant means of accomplishing such a task,
or any pointers for such a project?
If I do take this route, does anyone know if there's a way to harness
Xcode's ability to identify every function within a source file, as
they appear in the pull-down menu in the bar above the source file?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden