c - Access EIP and EBP via ucontext on OS X -


I am trying to port a device to OSX which is designed to run on Linux and FreeBSD . There is a case in this program where access to EIP and EBP is needed. It is done through ucontext.

So I've added a case for __APPLE__, which provides the appropriate access to the ucontext string.

  9887 #if define (__freebsd) 9888 * paddr = uc- & gt; Uc_mcontext.mc_eip; 9889 # Alif defined (__ diet-drinker __) 9890 * padr = uc- & gt; Uc_mcontext.eip; 9891 # Alif defined (__apli__) 9892 * padr = uc- & gt; Uc_mcontext.ss.eip; 9893 # Else 9894 * Pedro = UK-> uc_mcontext.gregs [REG_EIP]; 9895 # Andif  

But the UK-> UCMextract does not compile the IEEEE. It is not certain how to reach UIPP from Ucontext.

This naming scheme has changed to OS X 10.5, where it has uc-> Uc_mcontext- & gt; __SS.__eIP should be. In later versions it is uc-> for x86_64 Uc_mcontext- & gt; __SS___Rip is .

Accelerated from RIF,


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -