From bb6e6923f25841874b6a915d234d884ddd4c92dd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 11 Apr 2019 23:04:13 +0200 Subject: Add environment variable NIX_SHOW_SYMBOLS for dumping the symbol table --- src/libexpr/symbol-table.hh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libexpr/symbol-table.hh') diff --git a/src/libexpr/symbol-table.hh b/src/libexpr/symbol-table.hh index 44929f7ee..91faea122 100644 --- a/src/libexpr/symbol-table.hh +++ b/src/libexpr/symbol-table.hh @@ -75,6 +75,13 @@ public: } size_t totalSize() const; + + template + void dump(T callback) + { + for (auto & s : symbols) + callback(s); + } }; } -- cgit v1.2.3