MCPcopy Create free account
hub / github.com/MayaPosch/NymphCast / PrintCallstack

Method PrintCallstack

src/server/angelscript/add_on/debugger/debugger.cpp:757–774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

755}
756
757void CDebugger::PrintCallstack(asIScriptContext *ctx)
758{
759 if( ctx == 0 )
760 {
761 Output("No script is running\n");
762 return;
763 }
764
765 stringstream s;
766 const char *file = 0;
767 int lineNbr = 0;
768 for( asUINT n = 0; n < ctx->GetCallstackSize(); n++ )
769 {
770 lineNbr = ctx->GetLineNumber(n, 0, &file);
771 s << (file ? file : "{unnamed}") << ":" << lineNbr << "; " << ctx->GetFunction(n)->GetDeclaration() << endl;
772 }
773 Output(s.str());
774}
775
776void CDebugger::AddFuncBreakPoint(const string &func)
777{

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected