MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _msg_stack_dump

Method _msg_stack_dump

editor/debugger/script_editor_debugger.cpp:498–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

496}
497
498void ScriptEditorDebugger::_msg_stack_dump(uint64_t p_thread_id, const Array &p_data) {
499 DebuggerMarshalls::ScriptStackDump stack;
500 stack.deserialize(p_data);
501
502 stack_dump->clear();
503 inspector->clear_stack_variables();
504 TreeItem *r = stack_dump->create_item();
505
506 Array stack_dump_info;
507
508 int i = 0;
509 for (List<ScriptLanguage::StackInfo>::Iterator itr = stack.frames.begin(); itr != stack.frames.end(); ++itr, ++i) {
510 TreeItem *s = stack_dump->create_item(r);
511 Dictionary d;
512 d["frame"] = i;
513 d["file"] = itr->file;
514 d["function"] = itr->func;
515 d["line"] = itr->line;
516 stack_dump_info.push_back(d);
517 s->set_metadata(0, d);
518
519 String line = itos(i) + " - " + String(d["file"]) + ":" + itos(d["line"]) + " - at function: " + String(d["function"]);
520 s->set_text(0, line);
521
522 if (i == 0) {
523 s->select(0);
524 }
525 }
526 emit_signal(SNAME("stack_dump"), stack_dump_info);
527}
528
529void ScriptEditorDebugger::_msg_stack_frame_vars(uint64_t p_thread_id, const Array &p_data) {
530 inspector->clear_stack_variables();

Callers

nothing calls this directly

Calls 12

itosFunction · 0.85
clear_stack_variablesMethod · 0.80
set_metadataMethod · 0.80
StringClass · 0.50
deserializeMethod · 0.45
clearMethod · 0.45
create_itemMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45
set_textMethod · 0.45
selectMethod · 0.45

Tested by

no test coverage detected