Guard off parts which do no apply to Darwin/PowerPC ##build

* ppc_debug_state_t was never type defined
This commit is contained in:
Sevan Janiyan 2024-04-02 02:25:00 +01:00 committed by GitHub
parent f4af9761c0
commit acf85e6a7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -478,9 +478,9 @@ bool xnu_reg_write(RDebug *dbg, int type, const ut8 *buf, int size) {
#else
size_t buf_size = R_MIN (size, th->state_size);
memcpy (th->state, buf, buf_size);
#endif
#endif
}
#endif
ret = xnu_thread_set_gpr (dbg, th);
break;
}

View File

@ -140,7 +140,7 @@ static bool xnu_thread_set_drx(RDebug *dbg, xnu_thread_t *thread) {
# ifndef PPC_DEBUG_STATE32
# define PPC_DEBUG_STATE32 1
# endif
ppc_debug_state_t *regs;
//ppc_debug_state_t *regs;
//thread->flavor = PPC_DEBUG_STATE32;
//thread->count = R_MIN (thread->count, sizeof (regs->uds.ds32));
return false;
@ -264,6 +264,7 @@ static bool xnu_thread_get_gpr(RDebug *dbg, xnu_thread_t *thread) {
sizeof (x86_thread_state64_t) :
sizeof (x86_thread_state32_t);
#endif
#if !__POWERPC__
rc = thread_get_state (thread->port, thread->flavor,
(thread_state_t)regs, &thread->count);
@ -279,6 +280,7 @@ static bool xnu_thread_get_gpr(RDebug *dbg, xnu_thread_t *thread) {
if (rc != KERN_SUCCESS) {
R_LOG_WARN ("failed to convert %d", rc);
}
#endif
#if __arm64e__
else {
if (dbg->bits == R_SYS_BITS_64) {
@ -286,7 +288,9 @@ static bool xnu_thread_get_gpr(RDebug *dbg, xnu_thread_t *thread) {
}
}
#endif
#if !__POWERPC__
}
#endif
if (rc != KERN_SUCCESS) {
r_sys_perror (__FUNCTION__);
thread->count = 0;