diff options
Diffstat (limited to 'example/ida')
| -rw-r--r-- | example/ida/ctype_propagation.py | 4 | ||||
| -rw-r--r-- | example/ida/depgraph.py | 6 | ||||
| -rw-r--r-- | example/ida/graph_ir.py | 6 | ||||
| -rw-r--r-- | example/ida/utils.py | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/example/ida/ctype_propagation.py b/example/ida/ctype_propagation.py index 9a81baef..f236cf26 100644 --- a/example/ida/ctype_propagation.py +++ b/example/ida/ctype_propagation.py @@ -304,8 +304,8 @@ def analyse_function(): infos_types[expr] = set([objc]) # Add fake head - lbl_real_start = ir_arch.loc_db.getby_offset(addr) - lbl_head = ir_arch.loc_db.getby_name_create("start") + lbl_real_start = ir_arch.loc_db.get_offset_location(addr) + lbl_head = ir_arch.loc_db.get_or_create_name_location("start") first_block = asmcfg.label2block(lbl_real_start) diff --git a/example/ida/depgraph.py b/example/ida/depgraph.py index 8e635203..1ba7bee7 100644 --- a/example/ida/depgraph.py +++ b/example/ida/depgraph.py @@ -28,7 +28,7 @@ class depGraphSettingsForm(ida_kernwin.Form): self.address = idc.ScreenEA() cur_block = None for block in ira.getby_offset(self.address): - offset = self.ira.loc_db.loc_key_to_offset(block.loc_key) + offset = self.ira.loc_db.get_location_offset(block.loc_key) if offset is not None: # Only one block non-generated assert cur_block is None @@ -230,7 +230,7 @@ def launch_depgraph(): # Simplify affectations for irb in ir_arch.blocks.values(): irs = [] - offset = ir_arch.loc_db.loc_key_to_offset(irb.loc_key) + offset = ir_arch.loc_db.get_location_offset(irb.loc_key) fix_stack = offset is not None and settings.unalias_stack for assignblk in irb: if fix_stack: @@ -251,7 +251,7 @@ def launch_depgraph(): # Get dependency graphs dg = settings.depgraph graphs = dg.get(loc_key, elements, line_nb, - set([ir_arch.loc_db.getby_offset(func.startEA)])) + set([ir_arch.loc_db.get_offset_location(func.startEA)])) # Display the result comments = {} diff --git a/example/ida/graph_ir.py b/example/ida/graph_ir.py index 955dee62..50895b88 100644 --- a/example/ida/graph_ir.py +++ b/example/ida/graph_ir.py @@ -36,7 +36,7 @@ def label_str(self): def color_irblock(irblock, ir_arch): out = [] - lbl = idaapi.COLSTR(ir_arch.loc_db.str_loc_key(irblock.loc_key), idaapi.SCOLOR_INSN) + lbl = idaapi.COLSTR(ir_arch.loc_db.pretty_str(irblock.loc_key), idaapi.SCOLOR_INSN) out.append(lbl) for assignblk in irblock: for dst, src in sorted(assignblk.iteritems()): @@ -118,8 +118,8 @@ def build_graph(verbose=False, simplify=False): for addr, name in idautils.Names(): if name is None: continue - if (mdis.loc_db.getby_offset(addr) or - mdis.loc_db.getby_name(name)): + if (mdis.loc_db.get_offset_location(addr) or + mdis.loc_db.get_name_location(name)): # Symbol alias continue mdis.loc_db.add_location(name, addr) diff --git a/example/ida/utils.py b/example/ida/utils.py index 254617ba..c66475f2 100644 --- a/example/ida/utils.py +++ b/example/ida/utils.py @@ -98,7 +98,7 @@ class TranslatorIDA(Translator): def from_ExprLoc(self, expr): if self.loc_db is not None: - out = self.loc_db.str_loc_key(expr.loc_key) + out = self.loc_db.pretty_str(expr.loc_key) else: out = str(expr) out = idaapi.COLSTR(out, idaapi.SCOLOR_REG) |