Fix s390x build without debugger (#6316)
* Fix s390x build without debugger From: Andreas Schneider <asn@cryptomilk.org> Date: Wed, 23 Apr 2026 11:35:00 +0200 Subject: [PATCH] Fix s390x link error when debugger is disabled When the debugger is disabled (-Ddebugger=false), debug_native.c is not compiled, so rz_debug_get_tls() and rz_debug_native_threads() are never defined. However, linux_heap_glibc.c (part of librz_core) calls both functions unconditionally, causing a link failure on s390x. Add stub implementations in debug.c guarded by #if !DEBUGGER so the symbols are always present in librz_debug regardless of the debugger option. * Fix formatting --------- Co-authored-by: Giovanni <561184+wargio@users.noreply.github.com>
This commit is contained in:
parent
fe524a30e8
commit
d3a51fd7b0
1 changed files with 11 additions and 0 deletions
|
|
@ -1800,3 +1800,14 @@ RZ_API RzDebugPid *rz_debug_get_thread(RzList /*<RzList *>*/ *th_list, int tid)
|
|||
}
|
||||
return (RzDebugPid *)rz_list_val(it);
|
||||
}
|
||||
|
||||
#if !DEBUGGER
|
||||
// Empty stubs are needed for compilation on s390x platform when debugger is disabled
|
||||
RZ_API ut64 rz_debug_get_tls(RZ_NONNULL RzDebug *dbg, int tid) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
RZ_API RZ_OWN RzList /*<RzDebugPid *>*/ *rz_debug_native_threads(RzDebug *dbg, int pid) {
|
||||
return rz_list_new();
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue