MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / sendBreak

Method sendBreak

Engine/source/console/telnetDebugger.cpp:452–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

450}
451
452void TelnetDebugger::sendBreak()
453{
454 // echo out the break
455 send("BREAK");
456 char buffer[MaxCommandSize];
457 char scope[MaxCommandSize];
458
459 S32 last = 0;
460
461 for(S32 i = (S32) gEvalState.getStackDepth() - 1; i >= last; i--)
462 {
463 CodeBlock *code = gEvalState.stack[i]->code;
464 const char *file = "<none>";
465 if (code && code->name && code->name[0])
466 file = code->name;
467
468 Namespace *ns = gEvalState.stack[i]->scopeNamespace;
469 scope[0] = 0;
470 if ( ns ) {
471
472 if ( ns->mParent && ns->mParent->mPackage && ns->mParent->mPackage[0] ) {
473 dStrcat( scope, ns->mParent->mPackage );
474 dStrcat( scope, "::" );
475 }
476 if ( ns->mName && ns->mName[0] ) {
477 dStrcat( scope, ns->mName );
478 dStrcat( scope, "::" );
479 }
480 }
481
482 const char *function = gEvalState.stack[i]->scopeName;
483 if ((!function) || (!function[0]))
484 function = "<none>";
485 dStrcat( scope, function );
486
487 U32 line=0, inst;
488 U32 ip = gEvalState.stack[i]->ip;
489 if (code)
490 code->findBreakLine(ip, line, inst);
491 dSprintf(buffer, MaxCommandSize, " %s %d %s", file, line, scope);
492 send(buffer);
493 }
494
495 send("\r\n");
496}
497
498void TelnetDebugger::processLineBuffer(S32 cmdLen)
499{

Callers

nothing calls this directly

Calls 4

dStrcatFunction · 0.85
dSprintfFunction · 0.85
getStackDepthMethod · 0.80
findBreakLineMethod · 0.80

Tested by

no test coverage detected