Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
signalapp
GitHub Repository: signalapp/Signal-iOS
Path: blob/main/SignalServiceKit/Debugging/DebuggerUtils.h
1 views
1
//
2
// Copyright 2024 Signal Messenger, LLC
3
// SPDX-License-Identifier: AGPL-3.0-only
4
//
5
6
#import <Foundation/Foundation.h>
7
8
#ifdef DEBUG
9
10
NS_ASSUME_NONNULL_BEGIN
11
12
// Returns whether the debugger is attached to this process.
13
BOOL IsDebuggerAttached(void);
14
15
// If the debugger is attached, break (like a breakpoint). Otherwise, abort.
16
void TrapDebugger(void);
17
18
NS_ASSUME_NONNULL_END
19
20
#else // DEBUG
21
22
NS_INLINE BOOL IsDebuggerAttached(void)
23
{
24
return NO;
25
}
26
27
NS_INLINE void TrapDebugger(void)
28
{
29
}
30
31
#endif // DEBUG
32
33