Re: Sampler tool: attaching a process which will be launched by another process
Re: Sampler tool: attaching a process which will be launched by another process
- Subject: Re: Sampler tool: attaching a process which will be launched by another process
- From: Daniel Jalkut <email@hidden>
- Date: Fri, 16 Dec 2005 09:42:44 -0500
Neat! Too bad gdb doesn't have such an option. (or does it?)
Daniel
On Dec 16, 2005, at 12:26 AM, Eric Albert wrote:
In this particular case, if you want to sample the process (as
opposed to running it in gdb or doing other things like that to
it), use the command-line version of Sampler, sample, and its '-
wait' flag.
Hope this helps,
Eric
On Dec 15, 2005, at 8:49 PM, Daniel Jalkut wrote:
Philippe - if I understand your problem correctly, I don't think
there is much you can (easily) do to intercept the process when
it's run. Apple's advice on the subject seems limited to having
enough control over the target process that you can recompile with
a delay built in to the process at launch time, giving you time to
attach.
I've thought about this problem because I've also sought a way of
intercepting such processes. What's I've considered doing in the
past is making a backup of the target process binary, and then hex-
editing the target process so that its entry point instructions
are replaced with instructions causing an infinite loop. This
should cause an indefinite hang at which point you could attach
with gdb and replace the instructions with the original values.
Desperate times call for desperate actions? Let us know how it
works :)
Daniel
On Dec 15, 2005, at 4:16 AM, philippe wicker wrote:
Hi all,
I'm trying to trace calls within a process - the MIDIServer -
which is launched when some CoreMIDI APIs are called within
another "MID client" process. I've been able to trace such calls
by attaching the MIDIServer when it is already running, but the
problem I'm tracking occurs when the MIDIServer is not yet running.
How can I tell Sampler to attach this process when it will run?
Thanks
Philippe
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com
This email sent to email@hidden
_______________________________________________
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