Re: Query on program counters range
Re: Query on program counters range
- Subject: Re: Query on program counters range
- From: Arnab Ganguly <email@hidden>
- Date: Sun, 15 Mar 2009 17:27:36 +0530
I have a crash handler mechanism, I am able to retrieve the stack addresses, program counters from the crash on that I need to do symbol resolution.Is it possible to determine from the program counters (pcs) as this range of pcs or offsets are relevant to my application others are not?
Thanks in advance
-A
On Sun, Mar 15, 2009 at 3:59 PM, Jean-Daniel Dupas
<email@hidden> wrote:
The PC is the value of the $eip registry on i386.
You cannot set it directly (nor retrieve it), you have to perform a jmp or a call instruction.
If you try to do it using mach primitive from another thread (like in an exception handler), this is done setting the eip field of the thread struct.
Anyway, this is not something you should usually do. What are you trying to achieve exactly ?
Le 15 mars 09 à 05:26, Arnab Ganguly a écrit :
Hi,
Thanks for the update.Could you explain little bit more as how this is being done in the program as setting the program counters explicitly.
Regards
-A
On Tue, Mar 10, 2009 at 9:07 PM, Jean-Daniel Dupas
<email@hidden> wrote:
Le 10 mars 09 à 16:21, Arnab Ganguly a écrit : Hi All,
Not sure whether it is being posted in correct group.
Is it possible to get the range of stack addresses of a particular application, to be more specific I would like to know the range of Program counters that we get when application crashes.
Thanks in advance
-A
AFAK, program counter and stack address are not related. The PC can be any executable memory address (which include all shared libraries' __text sections and also any heap allocated memory block which is implicitly executable on i386, and can be explicitly set executable on x86_64).
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden