MCPcopy Create free account
hub / github.com/Icinga/icinga2 / dbg_eval_with_object

Function dbg_eval_with_object

lib/cli/consolecommand.cpp:102–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102extern "C" void dbg_eval_with_object(Object *object, const char *text)
103{
104 std::unique_ptr<Expression> expr;
105
106 try {
107 ScriptFrame frame(true);
108 frame.Locals = new Dictionary({
109 { "arg", object }
110 });
111 expr = ConfigCompiler::CompileText("<dbg>", text);
112 Value result = Serialize(expr->Evaluate(frame), 0);
113 dbg_inspect_value(result);
114 } catch (const std::exception& ex) {
115 std::cout << "Error: " << DiagnosticInformation(ex) << "\n";
116 }
117}
118
119void ConsoleCommand::BreakpointHandler(ScriptFrame& frame, ScriptError *ex, const DebugInfo& di)
120{

Callers

nothing calls this directly

Calls 2

dbg_inspect_valueFunction · 0.85
EvaluateMethod · 0.80

Tested by

no test coverage detected