MCPcopy Create free account
hub / github.com/anjo76/angelscript / PrintCallstack

Method PrintCallstack

sdk/add_on/debugger/debugger.cpp:768–785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

766}
767
768void CDebugger::PrintCallstack(asIScriptContext *ctx)
769{
770 if( ctx == 0 )
771 {
772 Output("No script is running\n");
773 return;
774 }
775
776 stringstream s;
777 const char *file = 0;
778 int lineNbr = 0;
779 for( asUINT n = 0; n < ctx->GetCallstackSize(); n++ )
780 {
781 lineNbr = ctx->GetLineNumber(n, 0, &file);
782 s << (file ? file : "{unnamed}") << ":" << lineNbr << "; " << ctx->GetFunction(n)->GetDeclaration() << endl;
783 }
784 Output(s.str());
785}
786
787void CDebugger::AddFuncBreakPoint(const string &func)
788{

Callers

nothing calls this directly

Calls 5

GetCallstackSizeMethod · 0.80
GetDeclarationMethod · 0.80
strMethod · 0.80
GetLineNumberMethod · 0.45
GetFunctionMethod · 0.45

Tested by

no test coverage detected