MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / getStackWalk

Method getStackWalk

src/runtime/context.cpp:725–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

723 };
724
725 string Context::getStackWalk ( const LineInfo * at, bool showArguments, bool showLocalVariables, bool showOutOfScope, bool stackTopOnly ) {
726 FPE_DISABLE;
727 TextWriter ssw;
728 #if DAS_ENABLE_STACK_WALK
729 ssw << "\n";
730 if ( at ) {
731 ssw << "from " << at->describe() << "\n";
732 }
733 char * sp = stack.ap();
734 ssw << "CALL STACK (sp=" << (stack.top() - stack.ap())
735 << ",sptr=0x" << HEX << intptr_t(sp) << DEC << "):\n";
736 StackWalkerTextWriter walker ( ssw, this );
737 walker.showArguments = showArguments;
738 walker.showLocalVariables = showLocalVariables;
739 walker.showOutOfScope = showOutOfScope;
740 walker.stackTopOnly = stackTopOnly;
741 dapiStackWalk ( &walker, *this, at ? *at : LineInfo() );
742 ssw << "\n";
743 #else
744 ssw << "\nCALL STACK TRACKING DISABLED:\n\n";
745 #endif
746 return ssw.str();
747 }
748
749 void tickSpecificDebugAgent ( const char * name ) {
750 std::lock_guard<std::recursive_mutex> guard(g_DebugAgentMutex);

Callers 3

evalMethod · 0.80
stackWalkToErrFunction · 0.80
print_das_stack_walkFunction · 0.80

Calls 6

dapiStackWalkFunction · 0.85
apMethod · 0.80
topMethod · 0.80
LineInfoClass · 0.50
describeMethod · 0.45
strMethod · 0.45

Tested by 1

print_das_stack_walkFunction · 0.64