Skip to content

Commit 404d49c

Browse files
authored
Merge pull request diffblue#197 from diffblue/feature/instruction_ordinal_in_HTML_dump
SEC-66 : Added ordinals of instructions in GOTO functions in HTML dump.
2 parents 6e98fd6 + 2bd09cd commit 404d49c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/summaries/summary_dump.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ std::string dump_function_body_in_html(
238238
" <caption>Instructions of the function. Column 'Loc' shows program "
239239
"locations. All numbers are decimal.</caption>\n"
240240
" <tr>\n"
241+
" <th>Ord</th>\n"
241242
" <th>Loc</th>\n"
242243
" <th>Targets</th>\n"
243244
" <th>Instruction</th>\n"
@@ -254,15 +255,21 @@ std::string dump_function_body_in_html(
254255
{
255256
ostr << " <tr>\n";
256257

258+
// Dumping ordinal of the instruction
259+
ostr << " <td align=\"right\">"
260+
<< std::distance(fn_body.instructions.cbegin(), it)
261+
<< "</td>\n"
262+
;
263+
257264
// Dumping program location
258-
ostr << " <td>"
265+
ostr << " <td align=\"right\">"
259266
<< it->location_number
260267
<< "</td>\n"
261268
;
262269

263270
// Dumping targets
264271
if (it->is_target())
265-
ostr << " <td>" << it->target_number << "</td>\n";
272+
ostr << " <td align=\"center\">" << it->target_number << "</td>\n";
266273
else
267274
ostr << " <td> </td>\n";
268275

0 commit comments

Comments
 (0)