MCPcopy Create free account
hub / github.com/apache/brpc / BreakDebugger

Function BreakDebugger

src/butil/debug/debugger_posix.cc:239–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237#endif
238
239void BreakDebugger() {
240 // NOTE: This code MUST be async-signal safe (it's used by in-process
241 // stack dumping signal handler). NO malloc or stdio is allowed here.
242
243 DEBUG_BREAK();
244#if defined(OS_ANDROID) && !defined(OFFICIAL_BUILD)
245 // For Android development we always build release (debug builds are
246 // unmanageably large), so the unofficial build is used for debugging. It is
247 // helpful to be able to insert BreakDebugger() statements in the source,
248 // attach the debugger, inspect the state of the program and then resume it by
249 // setting the 'go' variable above.
250#elif defined(NDEBUG)
251 // Terminate the program after signaling the debug break.
252 _exit(1);
253#endif
254}
255
256} // namespace debug
257} // namespace butil

Callers 5

InitMethod · 0.85
FlushWithoutResetMethod · 0.85
RawLogFunction · 0.85
WaitForDebuggerFunction · 0.85
StackDumpSignalHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected