Skip to content

Commit dc8c7c3

Browse files
Use correct function return identifier of functions without body
in trace output
1 parent 4da6a43 commit dc8c7c3

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/goto-programs/json_goto_trace.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,7 @@ void convert_return(
263263
json_call_return["internal"] = jsont::json_boolean(step.internal);
264264
json_call_return["thread"] = json_numbert(std::to_string(step.thread_nr));
265265

266-
const irep_idt &function_identifier =
267-
(step.type == goto_trace_stept::typet::FUNCTION_CALL) ? step.called_function
268-
: step.function_id;
266+
const irep_idt &function_identifier = step.called_function;
269267

270268
const symbolt &symbol = ns.lookup(function_identifier);
271269
json_call_return["function"] =

src/goto-programs/xml_goto_trace.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,11 @@ void convert(
186186
xml_call_return.set_attribute("thread", std::to_string(step.thread_nr));
187187
xml_call_return.set_attribute("step_nr", std::to_string(step.step_nr));
188188

189-
const symbolt &symbol = ns.lookup(step.function_id);
189+
const symbolt &symbol = ns.lookup(step.called_function);
190190
xmlt &xml_function=xml_call_return.new_element("function");
191191
xml_function.set_attribute(
192192
"display_name", id2string(symbol.display_name()));
193-
xml_function.set_attribute("identifier", id2string(step.function_id));
193+
xml_function.set_attribute("identifier", id2string(symbol.name));
194194
xml_function.new_element()=xml(symbol.location);
195195

196196
if(xml_location.name!="")

0 commit comments

Comments
 (0)