• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ucontext.h changes between 10.4 and 10.5?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ucontext.h changes between 10.4 and 10.5?


  • Subject: Re: ucontext.h changes between 10.4 and 10.5?
  • From: Rick Mann <email@hidden>
  • Date: Wed, 12 Aug 2009 15:25:47 -0700

I'm guessing I'm going to need to change this code. It uses ucontext to get the sigcontext, and then uses that to save off some registers and optionally deal with some error state.

Is there a way to do that without relying on a fragile API?

I can (probably) post some of our code if it helps. But we basically do this:

#if defined( HAVE_BSD_STYLE_SIGNALS )
#define SIGCONTEXT_MEMBER(x, y) ( static_cast< unsigned long >( x- >sc_##y ) )
#endif


void Global_sigaction_handler( int signum, siginfo_t *sinfo, void *arg )
{
struct ucontext * uc = reinterpret_cast<struct ucontext *>( arg );
struct sigcontext * context = (struct sigcontext *)&uc- >uc_mcontext;


    ...

    HAL_SavedRegisters	regs;

    regs.edi = SIGCONTEXT_MEMBER( context, edi );
    regs.esi = SIGCONTEXT_MEMBER( context, esi );

    ...etc...
}

Is there an alternative way to implement this?

On Aug 12, 2009, at 11:16:46, Rick Mann wrote:

I have some code that was compiling when the project was set to 10.4 or "Use Base SDK" (I'm not really sure what that means. In my project, Base SDK is set to 10.5). But if I compile it with 10.5 (the Overview menu), it fails in a lot of ways, including issues around ucontext and sigcontext.

Any ideas?

I'm not able to significantly change this code. It's deep in our custom OS code. Is it just a matter of changing the name of the struct we're referencing or include a different header?

TIA,
Rick

_______________________________________________
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

_______________________________________________ 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
  • Follow-Ups:
    • Re: ucontext.h changes between 10.4 and 10.5?
      • From: Terry Lambert <email@hidden>
References: 
 >ucontext.h changes between 10.4 and 10.5? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Open Source Release for Mac OS X 10.5.8
  • Next by Date: Re: ucontext.h changes between 10.4 and 10.5?
  • Previous by thread: ucontext.h changes between 10.4 and 10.5?
  • Next by thread: Re: ucontext.h changes between 10.4 and 10.5?
  • Index(es):
    • Date
    • Thread