Skip to content

Commit 05cfdc8

Browse files
Improve debug logging in get_value_set
Use #ifdef DEBUG instead of #if 0 so that compilation can be checked on CI; give more information about what we are logging; which also makes it easier to find the origin of the output when seen from logs.
1 parent 0e1ded6 commit 05cfdc8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/goto-symex/symex_dereference_state.cpp

+8-4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Author: Daniel Kroening, [email protected]
1313

1414
#include <util/symbol_table.h>
1515

16+
#ifdef DEBUG
17+
# include <iostream>
18+
#endif
19+
1620
/// Get or create a failed symbol for the given pointer-typed expression. These
1721
/// are used as placeholders when dereferencing expressions that are illegal to
1822
/// dereference, such as null pointers. The \ref add_failed_symbols pass must
@@ -84,10 +88,10 @@ void symex_dereference_statet::get_value_set(
8488
{
8589
state.value_set.get_value_set(expr, value_set, ns);
8690

87-
#if 0
88-
std::cout << "**************************\n";
89-
state.value_set.output(goto_symex.ns, std::cout);
90-
std::cout << "**************************\n";
91+
#ifdef DEBUG
92+
std::cout << "symex_dereference_statet state.value_set={\n";
93+
state.value_set.output(ns, std::cout, " - ");
94+
std::cout << "}" << std::endl;
9195
#endif
9296

9397
#if 0

0 commit comments

Comments
 (0)