Skip to content

Commit ff1e5c6

Browse files
Peter Schrammelmgudemann
Peter Schrammel
authored andcommitted
source location in function listing
1 parent 8e24b9c commit ff1e5c6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/goto-programs/show_goto_functions.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Author: Peter Schrammel
1010

1111
#include <util/xml.h>
1212
#include <util/json.h>
13+
#include <util/json_expr.h>
1314
#include <util/i2string.h>
1415
#include <util/xml_expr.h>
1516
#include <util/cprover_prefix.h>
@@ -69,6 +70,8 @@ void show_goto_functions(
6970
json_objectt &json_function=
7071
json_functions.push_back(jsont()).make_object();
7172
json_function["name"]=json_stringt(id2string(it->first));
73+
const symbolt &symbol=ns.lookup(it->first);
74+
json_function["sourceLocation"]=json(symbol.location);
7275
json_function["isBodyAvailable"]=
7376
jsont::json_boolean(it->second.body_available());
7477
bool is_internal=(has_prefix(id2string(it->first), CPROVER_PREFIX) ||

0 commit comments

Comments
 (0)