From 3dfab6e534e0a1cf71c000a4d2a74e050ba576ce Mon Sep 17 00:00:00 2001 From: Ben Burdette Date: Mon, 14 Mar 2022 11:58:11 -0600 Subject: [PATCH] have only one debuggerHook declaration --- src/libcmd/command.cc | 4 ---- src/libexpr/eval.cc | 2 -- src/libexpr/eval.hh | 1 - src/libexpr/nixexpr.cc | 3 +++ 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc index 56288665a..18aa82577 100644 --- a/src/libcmd/command.cc +++ b/src/libcmd/command.cc @@ -93,10 +93,6 @@ EvalCommand::EvalCommand() }); } -extern std::function debuggerHook; - - - EvalCommand::~EvalCommand() { if (evalState) diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index f21919598..6758677ca 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -37,8 +37,6 @@ namespace nix { -std::function debuggerHook; - static char * allocString(size_t size) { char * t; diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index e1d117c36..5f4556053 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -25,7 +25,6 @@ enum RepairFlag : bool; typedef void (* PrimOpFun) (EvalState & state, const Pos & pos, Value * * args, Value & v); -extern std::function debuggerHook; void printStaticEnvBindings(const Expr &expr); void printStaticEnvBindings(const StaticEnv &se, int lvl = 0); diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc index e09bd9484..add65c1a2 100644 --- a/src/libexpr/nixexpr.cc +++ b/src/libexpr/nixexpr.cc @@ -6,6 +6,9 @@ namespace nix { +/* Launch the nix debugger */ + +std::function debuggerHook; /* Displaying abstract syntax trees. */