diff options
| author | Aymeric Vincent <aymeric.vincent@cea.fr> | 2015-10-27 21:27:27 +0100 |
|---|---|---|
| committer | Aymeric Vincent <aymeric.vincent@cea.fr> | 2015-10-27 21:27:27 +0100 |
| commit | 5dbf046bbe07a28485a84eca14405d271d1ea7fa (patch) | |
| tree | 5cabdd356882f4d2606a02cc0ed468894f68a586 /example/symbol_exec/depgraph.py | |
| parent | fb32efb74e2dc1077586a2214de558db6940b70b (diff) | |
| download | miasm-5dbf046bbe07a28485a84eca14405d271d1ea7fa.tar.gz miasm-5dbf046bbe07a28485a84eca14405d271d1ea7fa.zip | |
In interactive use, allow C-like prefixes to choose the base of integers
Use Python's int(s, 0) to allow string "s" to specify its base where addresses and offsets can be supplied. This change makes the situation homogeneous among the various examples and interactive usage.
Diffstat (limited to 'example/symbol_exec/depgraph.py')
| -rw-r--r-- | example/symbol_exec/depgraph.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/example/symbol_exec/depgraph.py b/example/symbol_exec/depgraph.py index 5b6f373a..6aa9cf81 100644 --- a/example/symbol_exec/depgraph.py +++ b/example/symbol_exec/depgraph.py @@ -55,7 +55,7 @@ if args.rename_args: init_ctx[e_mem] = ExprId("arg%d" % i) # Disassemble the targeted function -blocks = mdis.dis_multibloc(int(args.func_addr, 16)) +blocks = mdis.dis_multibloc(int(args.func_addr, 0)) # Generate IR for block in blocks: @@ -71,7 +71,7 @@ dg = DependencyGraph(ir_arch, implicit=args.implicit, follow_call=not(args.unfollow_call)) # Build information -target_addr = int(args.target_addr, 16) +target_addr = int(args.target_addr, 0) current_block = list(ir_arch.getby_offset(target_addr))[0] line_nb = 0 for line_nb, line in enumerate(current_block.lines): |