X-Git-Url: https://git.saurik.com/apple/objc4.git/blobdiff_plain/8972963c21fb120c80c09e06536ba4aa7eb98af3..6a2c2cfaf4bb7aa509c3cb14c3e863b13ff5e02d:/runtime/objc-runtime-new.mm diff --git a/runtime/objc-runtime-new.mm b/runtime/objc-runtime-new.mm index 296df91..abf133c 100644 --- a/runtime/objc-runtime-new.mm +++ b/runtime/objc-runtime-new.mm @@ -122,6 +122,14 @@ PRIVATE_EXTERN int startDebuggerMode(void) return DEBUGGER_OFF; } + // side table locks are not optional + if (!noSideTableLocksHeld()) { + rwlock_unlock(&runtimeLock, debugger_runtimeLock); + mutex_unlock(&cacheUpdateLock); + debugger_runtimeLock = 0; + return DEBUGGER_OFF; + } + // selLock is optional if (rwlock_try_write(&selLock)) { debugger_selLock = RDWR; @@ -188,7 +196,7 @@ PRIVATE_EXTERN BOOL isManagedDuringDebugger(void *lock) * Locking a managed mutex during debugger mode causes a trap unless * this returns YES. **********************************************************************/ -PRIVATE_EXTERN BOOL isLockedDuringDebugger(mutex_t *lock) +PRIVATE_EXTERN BOOL isLockedDuringDebugger(void *lock) { assert(DebuggerMode);