74 |
} |
} |
75 |
} |
} |
76 |
|
|
77 |
|
#elif defined ALPHA_THREAD_STATE |
78 |
|
# define ELF_MACHINE EM_ALPHA |
79 |
|
|
80 |
|
/* The gregset_t format (compatible with Linux/Alpha) almost fits |
81 |
|
the Mach alpha_thread_state. */ |
82 |
|
static inline void |
83 |
|
fetch_thread_regset (thread_t thread, prgregset_t *gregs) |
84 |
|
{ |
85 |
|
mach_msg_type_number_t count = ALPHA_THREAD_STATE_COUNT; |
86 |
|
assert (sizeof (struct alpha_thread_state) <= sizeof (prgregset_t)); |
87 |
|
(void) thread_get_state (thread, ALPHA_THREAD_STATE, |
88 |
|
(thread_state_t) gregs, &count); |
89 |
|
/* XXX |
90 |
|
gregs[32] is process-status word: Mach doesn't return it! |
91 |
|
It's already zero'd. |
92 |
|
*/ |
93 |
|
} |
94 |
|
|
95 |
|
/* The FPU state matches exactly. */ |
96 |
|
static inline void |
97 |
|
fetch_thread_fpregset (thread_t thread, prfpregset_t *fpregs) |
98 |
|
{ |
99 |
|
mach_msg_type_number_t count = ALPHA_FLOAT_STATE_COUNT; |
100 |
|
assert (sizeof (struct alpha_float_state) == sizeof *fpregs); |
101 |
|
(void) thread_get_state (thread, ALPHA_FLOAT_STATE, |
102 |
|
(thread_state_t) fpregs, &count); |
103 |
|
} |
104 |
|
|
105 |
#else |
#else |
106 |
# warning "do not understand this machine flavor, no registers in dumps" |
# warning "do not understand this machine flavor, no registers in dumps" |
107 |
# define ELF_MACHINE EM_NONE |
# define ELF_MACHINE EM_NONE |