Skip to content

Commit

Permalink
summar.json: add function line number endings
Browse files Browse the repository at this point in the history
Signed-off-by: David Korczynski <david@adalogics.com>
  • Loading branch information
DavidKorczynski committed Jan 27, 2024
1 parent f2c73b7 commit b52e759
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/fuzz_introspector/datatypes/function_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def __init__(self, elem: Dict[Any, Any]) -> None:
self.function_source_file = elem['functionSourceFile']
self.linkage_type = elem['linkageType']
self.function_linenumber = elem['functionLinenumber']
self.function_line_number_end = elem.get('functionLinenumberEnd', -1)
self.return_type = elem['returnType']
self.arg_count = elem['argCount']
self.arg_types = elem['argTypes']
Expand Down
2 changes: 2 additions & 0 deletions src/fuzz_introspector/html_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ def create_all_function_table(
json_copy['return_type'] = fd.return_type
json_copy['raw-function-name'] = fd.raw_function_name
json_copy['callsites'] = fd.callsite
json_copy['source_line_begin'] = fd.function_linenumber
json_copy['source_line_end'] = fd.function_line_number_end
table_rows_json_report.append(json_copy)

logger.info("Assembled a total of %d entries" %
Expand Down

0 comments on commit b52e759

Please sign in to comment.