diff options
| author | Ajax <commial@gmail.com> | 2018-07-02 17:31:59 +0200 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2018-07-03 14:28:18 +0200 |
| commit | 68fac2e86cc61eba9adfe520fa0e04a7e8943450 (patch) | |
| tree | 2be74a21b54a3111f3c18746badfb0cf1ed41149 /example/disasm/full.py | |
| parent | 6ef8dbb2223d0847e3822b545b249511e96a1f9b (diff) | |
| download | miasm-68fac2e86cc61eba9adfe520fa0e04a7e8943450.tar.gz miasm-68fac2e86cc61eba9adfe520fa0e04a7e8943450.zip | |
symbol_pool -> loc_db
Diffstat (limited to 'example/disasm/full.py')
| -rw-r--r-- | example/disasm/full.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/example/disasm/full.py b/example/disasm/full.py index b0c34bff..1e5d2334 100644 --- a/example/disasm/full.py +++ b/example/disasm/full.py @@ -85,7 +85,7 @@ mn, dis_engine = machine.mn, machine.dis_engine ira, ir = machine.ira, machine.ir log.info('ok') -mdis = dis_engine(bs, symbol_pool=cont.symbol_pool) +mdis = dis_engine(bs, loc_db=cont.loc_db) # configure disasm engine mdis.dontdis_retcall = args.dontdis_retcall mdis.blocs_wd = args.blockwatchdog @@ -99,8 +99,8 @@ for addr in args.address: addrs.append(int(addr, 0)) except ValueError: # Second chance, try with symbol - loc_key = mdis.symbol_pool.getby_name(addr) - offset = mdis.symbol_pool.loc_key_to_offset(loc_key) + loc_key = mdis.loc_db.getby_name(addr) + offset = mdis.loc_db.loc_key_to_offset(loc_key) addrs.append(offset) if len(addrs) == 0 and default_addr is not None: @@ -140,10 +140,10 @@ while not finish and todo: instr = block.get_subcall_instr() if not instr: continue - for dest in instr.getdstflow(mdis.symbol_pool): + for dest in instr.getdstflow(mdis.loc_db): if not dest.is_loc(): continue - offset = mdis.symbol_pool.loc_key_to_offset(dest.loc_key) + offset = mdis.loc_db.loc_key_to_offset(dest.loc_key) todo.append((mdis, instr, offset)) if args.funcswatchdog is not None and args.funcswatchdog <= 0: @@ -158,7 +158,7 @@ while not finish and todo: # Generate dotty graph -all_asmcfg = AsmCFG(mdis.symbol_pool) +all_asmcfg = AsmCFG(mdis.loc_db) for blocks in all_funcs_blocks.values(): all_asmcfg += blocks @@ -189,8 +189,8 @@ log.info('total lines %s' % total_l) if args.gen_ir: log.info("generating IR and IR analysis") - ir_arch = ir(mdis.symbol_pool) - ir_arch_a = ira(mdis.symbol_pool) + ir_arch = ir(mdis.loc_db) + ir_arch_a = ira(mdis.loc_db) ir_arch.blocks = {} ir_arch_a.blocks = {} for ad, asmcfg in all_funcs_blocks.items(): |