From 9a718a30ceb8686893b0a4f606d5bfdcde5b9940 Mon Sep 17 00:00:00 2001 From: Camille Mougey Date: Wed, 7 Jan 2015 17:41:45 +0100 Subject: Example/Asm_ARM_SC: Reorganize and remove unused imports --- example/asm_arm_sc.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'example') diff --git a/example/asm_arm_sc.py b/example/asm_arm_sc.py index 16bfa181..83787f02 100644 --- a/example/asm_arm_sc.py +++ b/example/asm_arm_sc.py @@ -1,25 +1,24 @@ #! /usr/bin/env python -from miasm2.core.cpu import parse_ast -from miasm2.arch.arm.arch import mn_arm, base_expr, variable -from miasm2.core.bin_stream import bin_stream -from miasm2.core import parse_asm -from miasm2.expression.expression import * +from pdb import pm + from elfesteem.strpatchwork import StrPatchwork -from pdb import pm from miasm2.core import asmbloc -import struct +from miasm2.core.cpu import parse_ast +from miasm2.arch.arm.arch import mn_arm, base_expr +from miasm2.core import parse_asm +import miasm2.expression.expression as m2_expr reg_and_id = dict(mn_arm.regs.all_regs_ids_byname) def my_ast_int2expr(a): - return ExprInt32(a) + return m2_expr.ExprInt32(a) def my_ast_id2expr(t): - return reg_and_id.get(t, ExprId(t, size=32)) + return reg_and_id.get(t, m2_expr.ExprId(t, size=32)) my_var_parser = parse_ast(my_ast_id2expr, my_ast_int2expr) base_expr.setParseAction(my_var_parser) -- cgit 1.4.1