From 4d415d6eb66fa0cc5ff003a7a1732665083fb809 Mon Sep 17 00:00:00 2001 From: Camille Mougey Date: Wed, 7 Jan 2015 17:51:28 +0100 Subject: Example/Asm_mips32: Reorganize and remove unused imports --- example/asm_mips32.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'example') diff --git a/example/asm_mips32.py b/example/asm_mips32.py index aec57886..fc050f1f 100644 --- a/example/asm_mips32.py +++ b/example/asm_mips32.py @@ -1,25 +1,23 @@ #! /usr/bin/env python +from pdb import pm -from miasm2.core.cpu import parse_ast -from miasm2.arch.mips32.arch import mn_mips32, base_expr, variable -from miasm2.core.bin_stream import bin_stream -from miasm2.core import parse_asm -from miasm2.expression.expression import * from elfesteem.strpatchwork import StrPatchwork -from pdb import pm +from miasm2.core.cpu import parse_ast +from miasm2.arch.mips32.arch import mn_mips32, base_expr +from miasm2.core import parse_asm +import miasm2.expression.expression as m2_expr from miasm2.core import asmbloc -import struct reg_and_id = dict(mn_mips32.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