From 5dbf046bbe07a28485a84eca14405d271d1ea7fa Mon Sep 17 00:00:00 2001 From: Aymeric Vincent Date: Tue, 27 Oct 2015 21:27:27 +0100 Subject: 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. --- example/jitter/mips32.py | 2 +- example/jitter/msp430.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'example/jitter') diff --git a/example/jitter/mips32.py b/example/jitter/mips32.py index e41096cc..20d451ab 100644 --- a/example/jitter/mips32.py +++ b/example/jitter/mips32.py @@ -38,7 +38,7 @@ def code_sentinelle(jitter): return True def jit_mips32_binary(args): - filepath, entryp = args.binary, int(args.addr, 16) + filepath, entryp = args.binary, int(args.addr, 0) myjit = machine.jitter(jit_type = args.jitter) myjit.init_stack() diff --git a/example/jitter/msp430.py b/example/jitter/msp430.py index d752ef8c..eb327e05 100644 --- a/example/jitter/msp430.py +++ b/example/jitter/msp430.py @@ -31,7 +31,7 @@ parser.add_argument("addr", machine = Machine("msp430") def jit_msp430_binary(args): - filepath, entryp = args.binary, int(args.addr, 16) + filepath, entryp = args.binary, int(args.addr, 0) myjit = machine.jitter(jit_type = args.jitter) myjit.init_stack() -- cgit 1.4.1