Skip to content

Commit

Permalink
Fix debugger build on Mac OS X 10.5/x86
Browse files Browse the repository at this point in the history
Some more APIs were incorrectly checked for with __POWERPC__, even
though they have nothing to do with the architecture, but were only
introduced in Mac OS X 10.6.
  • Loading branch information
thestr4ng3r committed Apr 9, 2024
1 parent 505893b commit 149453b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion librz/debug/p/native/xnu/xnu_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1154,8 +1154,10 @@ static void xnu_map_free(RzDebugMap *map) {
}

static RzList *xnu_dbg_modules(RzDebug *dbg) {
#if __POWERPC__
#if !defined(MAC_OS_X_VERSION_10_7)
#warning TODO: xnu_dbg_modules not supported
// TASK_DYLD_INFO introduced in 10.6
// TASK_DYLD_ALL_IMAGE_INFO_* introduced in 10.7
return NULL;
#else
rz_return_val_if_fail(dbg && dbg->plugin_data, NULL);
Expand Down
4 changes: 3 additions & 1 deletion librz/debug/p/native/xnu/xnu_threads.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ RZ_IPI bool rz_xnu_thread_get_gpr(RzXnuDebug *ctx, xnu_thread_t *thread) {
}

static bool xnu_fill_info_thread(RzDebug *dbg, xnu_thread_t *thread) {
#if __POWERPC__
#if !defined(MAC_OS_X_VERSION_10_6)
// THREAD_IDENTIFIER_INFO introduced in 10.6
// TODO: use e.g. only basic info as a fallback here
thread->name = strdup("unknown");
return false;
#else
Expand Down

0 comments on commit 149453b

Please sign in to comment.