From 42ec230c4206014badae38f03c82d0e4b5e351e1 Mon Sep 17 00:00:00 2001 From: serpilliere Date: Sun, 29 Jul 2012 00:06:29 +0200 Subject: white space cleanup --- example/disas_and_graph.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'example') diff --git a/example/disas_and_graph.py b/example/disas_and_graph.py index 71f943ec..124b8f4a 100755 --- a/example/disas_and_graph.py +++ b/example/disas_and_graph.py @@ -162,19 +162,21 @@ for (n,f), ads in dll_dyn_funcs.items(): def my_disasm_callback(ad): - admode = opmode = u32 - kargs = {} - if options.machine_options: - if options.machine_options in ['u16', 'u32']: - admode = opmode = options.machine_options - kargs = {"admode":admode, "opmode":admode} - else: - raise ValueError('bad machine options') + attrib = {} + if mnemo == ia32_arch.x86_mn: + if options.machine_options: + if options.machine_options in ['u16', 'u32']: + admode = opmode = u32 + admode = opmode = options.machine_options + attrib = {"admode":admode, "opmode":admode} + else: + raise ValueError('bad machine options') + all_bloc = asmbloc.dis_bloc_all(mnemo, in_str, ad, set(), symbol_pool=symbol_pool, dontdis_retcall = options.dontdiscallret, follow_call = options.followcall, - **kargs) + attrib = attrib) g = asmbloc.bloc2graph(all_bloc) open('graph.txt', 'w').write(g) if mnemo == ia32_arch.x86_mn: -- cgit 1.4.1