Skip to content

Commit 2074039

Browse files
peterschrammelEnrico Steffinlongo
authored and
Enrico Steffinlongo
committed
Show shadow memory assignments in trace
1 parent 42a876f commit 2074039

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

regression/cbmc-shadow-memory/trace1/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
KNOWNBUG
1+
CORE
22
main.c
33
--stop-on-fail --unwind 5
44
^EXIT=10$

src/goto-symex/shadow_memory.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Author: Peter Schrammel
2323
#define SHADOW_MEMORY_LOCAL_SCOPE "_local"
2424
#define SHADOW_MEMORY_GET_FIELD "get_field"
2525
#define SHADOW_MEMORY_SET_FIELD "set_field"
26+
#define SHADOW_MEMORY_SYMBOL_PREFIX "__SM"
2627

2728
class code_function_callt;
2829
class abstract_goto_modelt;

src/goto-symex/symex_assign.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,9 @@ void symex_assignt::assign_non_struct_symbol(
228228
state.record_events.pop();
229229

230230
auto current_assignment_type =
231-
ns.lookup(l2_lhs.get_object_name()).is_auxiliary
231+
ns.lookup(l2_lhs.get_object_name()).is_auxiliary &&
232+
id2string(l2_lhs.get_object_name()).find(SHADOW_MEMORY_SYMBOL_PREFIX) !=
233+
std::string::npos
232234
? symex_targett::assignment_typet::HIDDEN
233235
: assignment_type;
234236

0 commit comments

Comments
 (0)