diff options
author | Ben Burdette <bburdette@protonmail.com> | 2022-05-19 11:07:18 -0600 |
---|---|---|
committer | Ben Burdette <bburdette@protonmail.com> | 2022-05-19 11:07:18 -0600 |
commit | f9cdb6af8dea863b325210d59a1f2e865a06010e (patch) | |
tree | 540b9dbdd53fbeb79320f846c92706d234b2e422 /src/libcmd/repl.cc | |
parent | 667074b5867ffe40e3f1c59bd8e4ebf259f86aaa (diff) | |
parent | 357fb84dbaad0b056704915c6a43764cda63ee7f (diff) |
Merge branch 'debug-exploratory-PR' into debuggerHook-eval-arg
Diffstat (limited to 'src/libcmd/repl.cc')
-rw-r--r-- | src/libcmd/repl.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc index cb5d5bb34..5b17f2fb2 100644 --- a/src/libcmd/repl.cc +++ b/src/libcmd/repl.cc @@ -441,8 +441,9 @@ void NixRepl::loadDebugTraceEnv(DebugTrace & dt) { initEnv(); - if (dt.expr.staticEnv) { - auto vm = mapStaticEnvBindings(state->symbols, *dt.expr.staticEnv.get(), dt.env); + auto se = state->getStaticEnv(dt.expr); + if (se) { + auto vm = mapStaticEnvBindings(state->symbols, *se.get(), dt.env); // add staticenv vars. for (auto & [name, value] : *(vm.get())) @@ -516,7 +517,7 @@ bool NixRepl::processLine(std::string line) else if (debuggerHook && (command == ":env")) { for (const auto & [idx, i] : enumerate(state->debugTraces)) { if (idx == debugTraceIndex) { - printEnvBindings(state->symbols, i.expr, i.env); + printEnvBindings(*state, i.expr, i.env); break; } } @@ -533,7 +534,7 @@ bool NixRepl::processLine(std::string line) std::cout << "\n" << ANSI_BLUE << idx << ANSI_NORMAL << ": "; showDebugTrace(std::cout, state->positions, i); std::cout << std::endl; - printEnvBindings(state->symbols, i.expr, i.env); + printEnvBindings(*state, i.expr, i.env); loadDebugTraceEnv(i); break; } |