This change adds some experimental new functionality on the parameters object accessible through a method call .PropagateLiveRangesFromCallingConvention(). Such method attempts to figure out where the parameters are located at each instruction of the function by placing arguments as per the calling convention and then walking the control flow graph of the disassembly via the data model disassembler. This can be of tremendous value when trying to understand code calling public APIs on publicly available symbols.
There are several things to currently note (re: limitations) about this functionality:
It only works for x64. The only calling convention that it CURRENTLY understands is the standard x64 Windows calling convention.
It does not have access to semantic data that the compiler would have. This means, for instance, that this code cannot tell the difference between a register being reused for another variable and a write back to a parameter. For the purposes of this traversal, both are frequently considered a kill and end the live range.
It does not presently understand callee cleaned stack (arguments). If the assembly leading to a call adjusts the stack pointer (e.g.: push) and the callee restores it, it may result in a failure of the method as parameters continue to alias up the stack. This is left as a TODO for a future revision.
This change also fixes a minor bug:
Creating a parameter of a type that hasn't been auto imported yet will trigger an auto import
This change adds some experimental new functionality on the parameters object accessible through a method call .PropagateLiveRangesFromCallingConvention(). Such method attempts to figure out where the parameters are located at each instruction of the function by placing arguments as per the calling convention and then walking the control flow graph of the disassembly via the data model disassembler. This can be of tremendous value when trying to understand code calling public APIs on publicly available symbols.
There are several things to currently note (re: limitations) about this functionality:
This change also fixes a minor bug: