MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / debugBreak

Method debugBreak

Engine/source/platformPOSIX/POSIXProcessControl.cpp:165–182  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

163
164//-----------------------------------------------------------------------------
165void Platform::debugBreak()
166{
167 // in windows, "Calling DebugBreak causes the program to display
168 // a dialog box as if it had crashed." So we segfault.
169 Con::errorf(ConsoleLogEntry::General,
170 "Platform::debugBreak: triggering SIGSEGV for core dump");
171 //kill(getpid(), SIGSEGV);
172
173 // On Linux, the mouse cursor will remain trapped when the SIGTRAP below triggers so we ensure the mouse
174 // locked state is disabled prior to dropping to debug
175 PlatformWindow* firstWindow = WindowManager->getFirstWindow();
176 if (firstWindow)
177 {
178 firstWindow->setMouseLocked(false);
179 }
180
181 kill(getpid(), SIGTRAP);
182}
183
184//-----------------------------------------------------------------------------
185void Platform::forceShutdown(S32 returnValue)

Callers

nothing calls this directly

Calls 3

errorfFunction · 0.50
getFirstWindowMethod · 0.45
setMouseLockedMethod · 0.45

Tested by

no test coverage detected