MCPcopy Create free account
hub / github.com/defold/defold / LogCallstack

Function LogCallstack

engine/crash/src/crash.cpp:355–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353 }
354
355 void LogCallstack(char* extras)
356 {
357 bool is_debug_mode = dLib::IsDebugMode();
358 dLib::SetDebugMode(true);
359 dmLogError("CALL STACK:\n\n");
360
361 char* p = extras;
362 char* end = extras + strlen(extras);
363 while( p < end )
364 {
365 char* lineend = strchr(p, '\n');
366 if (!lineend)
367 lineend = strchr(p, '\r');
368 if (lineend && lineend < end)
369 *lineend = 0;
370
371 dmLogError("%s", p);
372
373 if (!lineend)
374 break;
375
376 p = lineend+1;
377 }
378
379 dmLogError("\n");
380 dLib::SetDebugMode(is_debug_mode);
381 }
382
383}

Callers 3

GenerateCallstackFunction · 0.85
OnCrashFunction · 0.85
OnCrashFunction · 0.85

Calls 2

IsDebugModeFunction · 0.85
SetDebugModeFunction · 0.85

Tested by

no test coverage detected