mirror of git://gcc.gnu.org/git/gcc.git
os_dep.c (defined(MPROTECT_VDB) && defined(DARWIN)): Moved recently added defines to include/private/gc_priv.h
2007-01-19 Andreas Tobler <a.tobler@schweiz.org> * os_dep.c (defined(MPROTECT_VDB) && defined(DARWIN)): Moved recently added defines to include/private/gc_priv.h * darwin_stop_world.c: Removed the above defines. (catch_exception_raise): Added THREAD_FLD in exc_state for POWERPC too. * include/private/gc_priv.h: Moved definitions from darwin_stop_world.c and os_dep.c to here. Fixed THREAD definition fixes for ppc64. From-SVN: r120977
This commit is contained in:
parent
67e47f30d0
commit
d88c64564e
|
@ -1,3 +1,12 @@
|
||||||
|
2007-01-19 Andreas Tobler <a.tobler@schweiz.org>
|
||||||
|
|
||||||
|
* os_dep.c (defined(MPROTECT_VDB) && defined(DARWIN)): Moved recently
|
||||||
|
added defines to include/private/gc_priv.h
|
||||||
|
* darwin_stop_world.c: Removed the above defines.
|
||||||
|
(catch_exception_raise): Added THREAD_FLD in exc_state for POWERPC too.
|
||||||
|
* include/private/gc_priv.h: Moved definitions from darwin_stop_world.c
|
||||||
|
and os_dep.c to here. Fixed THREAD definition fixes for ppc64.
|
||||||
|
|
||||||
2007-01-17 David Daney <ddaney@avtrex.com>
|
2007-01-17 David Daney <ddaney@avtrex.com>
|
||||||
|
|
||||||
* configure.ac: Don't define NO_SIGSET and NO_DEBUGGING while
|
* configure.ac: Don't define NO_SIGSET and NO_DEBUGGING while
|
||||||
|
|
|
@ -20,19 +20,6 @@
|
||||||
# define PPC_RED_ZONE_SIZE 320
|
# define PPC_RED_ZONE_SIZE 320
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Try to work out the right way to access thread state structure members.
|
|
||||||
The structure has changed its definition in different Darwin versions. */
|
|
||||||
/* This now defaults to the (older) names without __, thus hopefully */
|
|
||||||
/* not breaking any existing Makefile.direct builds. */
|
|
||||||
#if defined (HAS_PPC_THREAD_STATE___R0) || \
|
|
||||||
defined (HAS_PPC_THREAD_STATE64___R0) || \
|
|
||||||
defined (HAS_X86_THREAD_STATE32___EAX) || \
|
|
||||||
defined (HAS_X86_THREAD_STATE64___RAX)
|
|
||||||
# define THREAD_FLD(x) __ ## x
|
|
||||||
#else
|
|
||||||
# define THREAD_FLD(x) x
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct StackFrame {
|
typedef struct StackFrame {
|
||||||
unsigned long savedSP;
|
unsigned long savedSP;
|
||||||
unsigned long savedCR;
|
unsigned long savedCR;
|
||||||
|
|
|
@ -472,15 +472,17 @@ extern GC_warn_proc GC_current_warn_proc;
|
||||||
# if defined(POWERPC)
|
# if defined(POWERPC)
|
||||||
# if CPP_WORDSZ == 32
|
# if CPP_WORDSZ == 32
|
||||||
# define GC_THREAD_STATE_T ppc_thread_state_t
|
# define GC_THREAD_STATE_T ppc_thread_state_t
|
||||||
|
# define GC_MACH_THREAD_STATE PPC_THREAD_STATE
|
||||||
|
# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT
|
||||||
# define GC_MACH_HEADER mach_header
|
# define GC_MACH_HEADER mach_header
|
||||||
# define GC_MACH_SECTION section
|
# define GC_MACH_SECTION section
|
||||||
# else
|
# else
|
||||||
# define GC_THREAD_STATE_T ppc_thread_state64_t
|
# define GC_THREAD_STATE_T ppc_thread_state64_t
|
||||||
|
# define GC_MACH_THREAD_STATE PPC_THREAD_STATE64
|
||||||
|
# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE64_COUNT
|
||||||
# define GC_MACH_HEADER mach_header_64
|
# define GC_MACH_HEADER mach_header_64
|
||||||
# define GC_MACH_SECTION section_64
|
# define GC_MACH_SECTION section_64
|
||||||
# endif
|
# endif
|
||||||
# define GC_MACH_THREAD_STATE PPC_THREAD_STATE
|
|
||||||
# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT
|
|
||||||
# elif defined(I386) || defined(X86_64)
|
# elif defined(I386) || defined(X86_64)
|
||||||
# if CPP_WORDSZ == 32
|
# if CPP_WORDSZ == 32
|
||||||
# define GC_THREAD_STATE_T x86_thread_state32_t
|
# define GC_THREAD_STATE_T x86_thread_state32_t
|
||||||
|
@ -500,6 +502,18 @@ extern GC_warn_proc GC_current_warn_proc;
|
||||||
# define GC_MACH_THREAD_STATE MACHINE_THREAD_STATE
|
# define GC_MACH_THREAD_STATE MACHINE_THREAD_STATE
|
||||||
# define GC_MACH_THREAD_STATE_COUNT MACHINE_THREAD_STATE_COUNT
|
# define GC_MACH_THREAD_STATE_COUNT MACHINE_THREAD_STATE_COUNT
|
||||||
# endif
|
# endif
|
||||||
|
/* Try to work out the right way to access thread state structure members.
|
||||||
|
The structure has changed its definition in different Darwin versions.
|
||||||
|
This now defaults to the (older) names without __, thus hopefully,
|
||||||
|
not breaking any existing Makefile.direct builds. */
|
||||||
|
# if defined (HAS_PPC_THREAD_STATE___R0) \
|
||||||
|
|| defined (HAS_PPC_THREAD_STATE64___R0) \
|
||||||
|
|| defined (HAS_X86_THREAD_STATE32___EAX) \
|
||||||
|
|| defined (HAS_X86_THREAD_STATE64___RAX)
|
||||||
|
# define THREAD_FLD(x) __ ## x
|
||||||
|
# else
|
||||||
|
# define THREAD_FLD(x) x
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
/*********************************/
|
/*********************************/
|
||||||
/* */
|
/* */
|
||||||
|
|
|
@ -3405,15 +3405,6 @@ extern kern_return_t exception_raise_state_identity(
|
||||||
|
|
||||||
#define MAX_EXCEPTION_PORTS 16
|
#define MAX_EXCEPTION_PORTS 16
|
||||||
|
|
||||||
#if defined (HAS_PPC_THREAD_STATE___R0) || \
|
|
||||||
defined (HAS_PPC_THREAD_STATE64___R0) || \
|
|
||||||
defined (HAS_X86_THREAD_STATE32___EAX) || \
|
|
||||||
defined (HAS_X86_THREAD_STATE64___RAX)
|
|
||||||
# define THREAD_FLD(x) __ ## x
|
|
||||||
#else
|
|
||||||
# define THREAD_FLD(x) x
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
mach_msg_type_number_t count;
|
mach_msg_type_number_t count;
|
||||||
exception_mask_t masks[MAX_EXCEPTION_PORTS];
|
exception_mask_t masks[MAX_EXCEPTION_PORTS];
|
||||||
|
@ -3853,7 +3844,7 @@ catch_exception_raise(
|
||||||
|
|
||||||
/* This is the address that caused the fault */
|
/* This is the address that caused the fault */
|
||||||
#if defined(POWERPC)
|
#if defined(POWERPC)
|
||||||
addr = (char*) exc_state.dar;
|
addr = (char*) exc_state. THREAD_FLD(dar);
|
||||||
#elif defined (I386) || defined (X86_64)
|
#elif defined (I386) || defined (X86_64)
|
||||||
addr = (char*) exc_state. THREAD_FLD(faultvaddr);
|
addr = (char*) exc_state. THREAD_FLD(faultvaddr);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue