diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-02-08 13:45:00 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-02-11 16:03:39 +0100 |
| commit | 0fecc22af0a10d4871e68532bbab69d1bffadec5 (patch) | |
| tree | 2ddee1f7d4d4e5f4b2566d16cec5823cbe084ef3 /example | |
| parent | d73460dd09302b1a272ad7e3e2cfd1c7cf0bf86c (diff) | |
| download | focaccia-miasm-0fecc22af0a10d4871e68532bbab69d1bffadec5.tar.gz focaccia-miasm-0fecc22af0a10d4871e68532bbab69d1bffadec5.zip | |
API: replace shift_offset by base_address
WARNING: base address is the negative of shift_offset
Diffstat (limited to 'example')
| -rw-r--r-- | example/disasm/full.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/example/disasm/full.py b/example/disasm/full.py index cc7f9be8..d159e8c6 100644 --- a/example/disasm/full.py +++ b/example/disasm/full.py @@ -45,9 +45,9 @@ parser.add_argument('-l', "--dontdis-retcall", action="store_true", help="If set, disassemble only call destinations") parser.add_argument('-s', "--simplify", action="count", help="Apply simplifications rules (liveness, graph simplification, ...)") -parser.add_argument('-o', "--shiftoffset", default=0, +parser.add_argument("--base-address", default=0, type=lambda x: int(x, 0), - help="Shift input binary by an offset") + help="Base address of the input binary") parser.add_argument('-a', "--try-disasm-all", action="store_true", help="Try to disassemble the whole binary") parser.add_argument('-i', "--image", action="store_true", @@ -79,10 +79,10 @@ if args.verbose: log.info('Load binary') if args.rawbinary: cont = Container.fallback_container(open(args.filename, "rb").read(), - vm=None, addr=args.shiftoffset) + vm=None, addr=args.base_address) else: with open(args.filename, "rb") as fdesc: - cont = Container.from_stream(fdesc, addr=args.shiftoffset) + cont = Container.from_stream(fdesc, addr=args.base_address) default_addr = cont.entry_point bs = cont.bin_stream |