diff options
| author | serpilliere <devnull@localhost> | 2011-10-07 14:05:24 +0200 |
|---|---|---|
| committer | serpilliere <devnull@localhost> | 2011-10-07 14:05:24 +0200 |
| commit | a8f8ca6c93e184687f33a682b85befdd00bfbbc6 (patch) | |
| tree | f44a23cc73f2051cbb05538ff499b77ef03c7dfc /example/disas_and_graph.py | |
| parent | 0f8d9874345d4ceae672e6c794a1071d880b5f69 (diff) | |
| download | miasm-a8f8ca6c93e184687f33a682b85befdd00bfbbc6.tar.gz miasm-a8f8ca6c93e184687f33a682b85befdd00bfbbc6.zip | |
add option follow call
Diffstat (limited to 'example/disas_and_graph.py')
| -rwxr-xr-x | example/disas_and_graph.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/example/disas_and_graph.py b/example/disas_and_graph.py index 268af176..ac99678a 100755 --- a/example/disas_and_graph.py +++ b/example/disas_and_graph.py @@ -32,6 +32,14 @@ parser.add_option('-r', "--rawfile", dest="rawfile", action="store_true", default=False, metavar=None, help="dont use PE/ELF/CLASS autodetect, disasm raw file") +parser.add_option('-c', "--followcall", dest="followcall", action="store_true", + default=False, metavar=None, + help="follow call dst") +parser.add_option('-n', "--dontdiscallret", dest="dontdiscallret", action="store_true", + default=False, metavar=None, + help="dont disasssemble call next instruction") + + (options, args) = parser.parse_args(sys.argv[1:]) if not args: parser.print_help() @@ -157,7 +165,9 @@ def my_disasm_callback(ad): raise ValueError('bad machine options') all_bloc = asmbloc.dis_bloc_all(mnemo, in_str, ad, set(), symbol_pool=symbol_pool, - amode = admode) + amode = admode, + dontdis_retcall = options.dontdiscallret, + follow_call = options.followcall) g = asmbloc.bloc2graph(all_bloc) open('graph.txt', 'w').write(g) if mnemo == ia32_arch.x86_mn: |