Skip to content

Split CFG extraction into multiple files#56

Open
valbucci wants to merge 21 commits into
br0kej:devfrom
valbucci:split-cfg-extraction
Open

Split CFG extraction into multiple files#56
valbucci wants to merge 21 commits into
br0kej:devfrom
valbucci:split-cfg-extraction

Conversation

@valbucci

Copy link
Copy Markdown
Contributor

Background

There was a JSON truncation issue when extracting CFG data from big files providing a lot of functions.

The truncation issue has already been solved in 3f9e509, where instead of aborting the whole extraction, it stores the CFGs until the end of file error is met. Still, this means that the data extraction would be incomplete.

Summary

This PR introduces the func-cfg extraction mode. This is the same data as with the plain cfg mode. However, the difference is that the agfj command is executed function-by-function and the result is stored in a separate file, following the same procedure as the bytes extraction.

For instance, this new mode can be tested with the following command:
bin2ml -l debug extract --extended-analysis -f mips64-gcc-7-O3_z3 -o . -m func-cfg --func-filename "{address}-{symbol}.{ext}"

The output will be a directory called mips64-gcc-7-O3_z3_func-cfg containing a set of files as exemplified below:

120077938-sym._init.json
1200779c0-sym.error_char_const_.json
120077a3c-sym.std____cxx11__basic_string_char__stdt__std__allocator_char__const___clone_isra72_.json
120077aa8-method.std____cxx11__basic_string_char__const___clone_.isra.34___clone_.constprop.39_.json
120077bbc-method.std____cxx11__basic_string_char__const___clone_.isra.63___clone_.constprop.83_.json
120077cd0-sym.std____cxx11__basic_string_char__stdt__std__allocator_char__const___clone_isra66_.json
120077d3c-method.z3_replayer__imp.kind2string_z3_rayer__imp__value_kind__const__clone_.isra.18_.json
120077e04-sym.void_std____cxx11__basic_string_charst__std__forward_iterator_tag___clone_isra51_.json
120077f0c-sym.std____cxx11__basic_string_char__stdar__const___clone_isra54___clone_constprop59_.json
120078020-method.void_std____cxx11__basic_string_c__std__forward_iterator_tag___clone_.isra.36_.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant