Fix mono_arch_setup_async_callback and add mono_arch_setup_resume_sighandler_ctx...
commitca47362a921ba3ce58b2ae75b319d06b74feef1e
authorCalvin <calvin@cmpct.info>
Fri, 23 Feb 2018 02:49:12 +0000 (22 22:49 -0400)
committerZoltan Varga <vargaz@gmail.com>
Fri, 23 Feb 2018 02:49:12 +0000 (22 21:49 -0500)
tree764ae65484705bd56f3bd40b86f70d8ff81b3548
parent6e0c91f05336ba6bd18df31c698cf7a00862666d
Fix mono_arch_setup_async_callback and add mono_arch_setup_resume_sighandler_ctx on PPC (#7159)

* Fix *setup_async_callback and add *resume_sighandler_ctx on PPC

mono_arch_setup_async_callback didn't work on systems that use
function pointers. For consistency with other backends with
exception support, also add mono_arch_setup_resume_sighandler_ctx,
which we can use to support mono_arch_setup_async_callback, like
those other backends.

Also enable async callbacks on AIX, then enable
*resume_sighandler_ctx on PPC Linux (untested) and AIX. With this,
I can now ^C in the REPL with AIX and have it work; whereas before
it bombed out, with or without async callbacks enabled or disabled.

* Don't configure func descriptors twice, set args reg with user data

* No sense configuring configuring function descriptors if
  the restore sigcontext call already set them up. (If Mac
  OS supports is verified and added to the ifdef maze, it'd
  be safe to remove this whole ifdef, and let the call in
  `exceptions-ppc` handle it all, as all supported OSes
  would have that call...)

* Set user_data in an arguments register, like what amd64
  and z do.

These don't seem to cause any regressions, like the first patch.

* Remove unnecessary case for PPC

* mono_ppc_set_func_into_sigctx is unused now, remove it

* Everyone has MONO_ARCH_HAVE_SETUP_RESUME_FROM_SIGNAL_HANDLER_CTX on PPC now

* Everyone has MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX on PPC too
mono/mini/debugger-agent.c
mono/mini/exceptions-ppc.c
mono/mini/mini-ppc.h