mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
Merge branch 'debug-exploratory-PR' into debuggerHook-eval-arg
This commit is contained in:
commit
f9cdb6af8d
6 changed files with 69 additions and 57 deletions
|
@ -25,7 +25,7 @@ enum RepairFlag : bool;
|
|||
|
||||
typedef void (* PrimOpFun) (EvalState & state, const PosIdx pos, Value * * args, Value & v);
|
||||
|
||||
void printEnvBindings(const SymbolTable & st, const Expr & expr, const Env & env);
|
||||
void printEnvBindings(const EvalState &es, const Expr & expr, const Env & env);
|
||||
void printEnvBindings(const SymbolTable & st, const StaticEnv & se, const Env & env, int lvl = 0);
|
||||
|
||||
struct PrimOp
|
||||
|
@ -130,6 +130,16 @@ public:
|
|||
bool debugStop;
|
||||
bool debugQuit;
|
||||
std::list<DebugTrace> debugTraces;
|
||||
std::map<const Expr*, const std::shared_ptr<const StaticEnv> > exprEnvs;
|
||||
const std::shared_ptr<const StaticEnv> getStaticEnv(const Expr &expr) const
|
||||
{
|
||||
auto i = exprEnvs.find(&expr);
|
||||
if (i != exprEnvs.end())
|
||||
return i->second;
|
||||
else
|
||||
return std::shared_ptr<const StaticEnv>();;
|
||||
}
|
||||
|
||||
|
||||
template<class E>
|
||||
[[gnu::noinline, gnu::noreturn]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue