diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2017-02-15 07:20:23 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2017-03-13 14:13:09 +0100 |
| commit | c3940991f2461278fdb3c7faff8b270320585556 (patch) | |
| tree | d4eae779f301e0d346c757b92e7461a7d4dd4c89 /example/ida/depgraph.py | |
| parent | e94fb099ce7cf80f57d21306de4c2b59ce7b3006 (diff) | |
| download | miasm-c3940991f2461278fdb3c7faff8b270320585556.tar.gz miasm-c3940991f2461278fdb3c7faff8b270320585556.zip | |
IR: rename blocs to blocks
Diffstat (limited to 'example/ida/depgraph.py')
| -rw-r--r-- | example/ida/depgraph.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/example/ida/depgraph.py b/example/ida/depgraph.py index 002075ee..9024f2af 100644 --- a/example/ida/depgraph.py +++ b/example/ida/depgraph.py @@ -25,8 +25,8 @@ class depGraphSettingsForm(Form): for line_nb, l in enumerate(cur_bloc.lines): if l.offset == self.address: break - cur_label = str(cur_bloc.label) - labels = sorted(map(str, ira.blocs.keys())) + cur_label = str(cur_block.label) + labels = sorted(map(str, ira.blocks.keys())) regs = sorted(ir_arch.arch.regs.all_regs_ids_byname.keys()) regs += self.stk_args.keys() reg_default = regs[0] @@ -82,7 +82,7 @@ Method to use: @property def label(self): value = self.cbBBL.value - for real_label in self.ira.blocs: + for real_label in self.ira.blocks: if str(real_label) == value: return real_label raise ValueError("Bad label") @@ -96,13 +96,13 @@ Method to use: elif mode == 1: return value + 1 else: - return len(self.ira.blocs[self.label].irs) + return len(self.ira.blocks[self.label].irs) @property def elements(self): value = self.cbReg.value if value in self.stk_args: - line = self.ira.blocs[self.label].lines[self.line_nb] + line = self.ira.blocks[self.label].lines[self.line_nb] arg_num = self.stk_args[value] stk_high = m2_expr.ExprInt(GetSpd(line.offset), ir_arch.sp.size) stk_off = m2_expr.ExprInt(self.ira.sp.size/8 * arg_num, ir_arch.sp.size) @@ -163,7 +163,7 @@ settings.Execute() label, elements, line_nb = settings.label, settings.elements, settings.line_nb # Simplify affectations -for irb in ir_arch.blocs.values(): +for irb in ir_arch.blocks.values(): fix_stack = irb.label.offset is not None and settings.unalias_stack for i, assignblk in enumerate(irb.irs): if fix_stack: @@ -215,7 +215,7 @@ def treat_element(): for node in graph.relevant_nodes: try: - offset = ir_arch.blocs[node.label].lines[node.line_nb].offset + offset = ir_arch.blocks[node.label].lines[node.line_nb].offset except IndexError: print "Unable to highlight %s" % node continue |