draperlaboratory / cbat_tools

Program analysis tools developed at Draper on the CBAT project.
MIT License
102 stars 14 forks source link

Fortunac/func name mapping #273

Closed fortunac closed 3 years ago

fortunac commented 3 years ago

This creates a map of original function names to modified function names, with a new flag of the form --func-name-map=<reg_orig>,<reg_mod>. Multiple patterns can be used and are delimited with a ;. For example, we can have main,main;foo,test_foo. By default, wp assumes that the functions have the same names. I struggled with finding an intuitive way for the user to input the regex, so any and all feedback is helpful.

Right now, the map lives in analysis.ml, but the plan is to move it into the env so that we can make use of it when we handle function calls.