@@ -23,6 +23,19 @@ Author: Daniel Kroening
23
23
#include " printf_formatter.h"
24
24
#include " xml_expr.h"
25
25
26
+ xmlt full_lhs_value (const goto_trace_stept &step, const namespacet &ns)
27
+ {
28
+ xmlt full_lhs_value{" full_lhs_value" };
29
+
30
+ auto lhs_object = step.get_lhs_object ();
31
+ irep_idt identifier =
32
+ lhs_object.has_value () ? lhs_object->get_identifier () : irep_idt ();
33
+
34
+ if (step.full_lhs_value .is_not_nil ())
35
+ full_lhs_value.data = from_expr (ns, identifier, step.full_lhs_value );
36
+ return full_lhs_value;
37
+ }
38
+
26
39
void convert (
27
40
const namespacet &ns,
28
41
const goto_tracet &goto_trace,
@@ -88,16 +101,13 @@ void convert(
88
101
}
89
102
}
90
103
91
- std::string full_lhs_string, full_lhs_value_string ;
104
+ std::string full_lhs_string;
92
105
93
106
if (step.full_lhs .is_not_nil ())
94
107
full_lhs_string = from_expr (ns, identifier, step.full_lhs );
95
108
96
- if (step.full_lhs_value .is_not_nil ())
97
- full_lhs_value_string = from_expr (ns, identifier, step.full_lhs_value );
98
-
99
109
xml_assignment.new_element (" full_lhs" ).data = full_lhs_string;
100
- xml_assignment.new_element (" full_lhs_value" ). data = full_lhs_value_string ;
110
+ xml_assignment.new_element (full_lhs_value (step, ns)) ;
101
111
102
112
xml_assignment.set_attribute_bool (" hidden" , step.hidden );
103
113
xml_assignment.set_attribute (" thread" , std::to_string (step.thread_nr ));
0 commit comments