mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-12-01 03:14:21 +01:00
Fix compilation of OS X handler on PPC with 10.5 SDK. r=nealsid at http://breakpad.appspot.com/30001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@404 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
895d3d17ee
commit
b73230385c
@ -323,11 +323,7 @@ bool MinidumpGenerator::WriteStack(breakpad_thread_state_data_t state,
|
||||
MDMemoryDescriptor *stack_location) {
|
||||
breakpad_thread_state_t *machine_state =
|
||||
reinterpret_cast<breakpad_thread_state_t *>(state);
|
||||
#if TARGET_CPU_PPC
|
||||
mach_vm_address_t start_addr = machine_state->r1;
|
||||
#else
|
||||
mach_vm_address_t start_addr = machine_state->__r1;
|
||||
#endif
|
||||
mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, r1);
|
||||
return WriteStackFromStartAddress(start_addr, stack_location);
|
||||
}
|
||||
|
||||
@ -336,11 +332,7 @@ MinidumpGenerator::CurrentPCForStack(breakpad_thread_state_data_t state) {
|
||||
breakpad_thread_state_t *machine_state =
|
||||
reinterpret_cast<breakpad_thread_state_t *>(state);
|
||||
|
||||
#if TARGET_CPU_PPC
|
||||
return machine_state->srr0;
|
||||
#else
|
||||
return machine_state->__srr0;
|
||||
#endif
|
||||
return REGISTER_FROM_THREADSTATE(machine_state, srr0);
|
||||
}
|
||||
|
||||
bool MinidumpGenerator::WriteContext(breakpad_thread_state_data_t state,
|
||||
@ -356,13 +348,8 @@ bool MinidumpGenerator::WriteContext(breakpad_thread_state_data_t state,
|
||||
MinidumpContext *context_ptr = context.get();
|
||||
context_ptr->context_flags = MD_CONTEXT_PPC_BASE;
|
||||
|
||||
#if TARGET_CPU_PPC64
|
||||
#define AddReg(a) context_ptr->a = machine_state->__ ## a
|
||||
#define AddGPR(a) context_ptr->gpr[a] = machine_state->__r ## a
|
||||
#else
|
||||
#define AddReg(a) context_ptr->a = machine_state->a
|
||||
#define AddGPR(a) context_ptr->gpr[a] = machine_state->r ## a
|
||||
#endif
|
||||
#define AddReg(a) context_ptr->a = REGISTER_FROM_THREADSTATE(machine_state, a)
|
||||
#define AddGPR(a) context_ptr->gpr[a] = REGISTER_FROM_THREADSTATE(machine_state, r ## a)
|
||||
|
||||
AddReg(srr0);
|
||||
AddReg(cr);
|
||||
|
@ -68,7 +68,7 @@ typedef MDRawContextPPC MinidumpContext;
|
||||
|
||||
// Use the REGISTER_FROM_THREADSTATE to access a register name from the
|
||||
// breakpad_thread_state_t structure.
|
||||
#if __DARWIN_UNIX03 || !TARGET_CPU_X86 || TARGET_CPU_X86_64
|
||||
#if __DARWIN_UNIX03 || TARGET_CPU_X86_64 || TARGET_CPU_PPC64
|
||||
// In The 10.5 SDK Headers Apple prepended __ to the variable names in the
|
||||
// i386_thread_state_t structure. There's no good way to tell what version of
|
||||
// the SDK we're compiling against so we just toggle on the same preprocessor
|
||||
|
Loading…
Reference in New Issue
Block a user