From e86dec41a03028340399f31844d0f5357eff52c7 Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Sat, 18 May 2019 10:06:53 +0200 Subject: [PATCH] Fix tipo --- .codespell_ignore | 2 ++ miasm/analysis/data_flow.py | 2 +- miasm/analysis/depgraph.py | 2 +- miasm/arch/mep/arch.py | 2 +- miasm/core/graph.py | 2 +- miasm/jitter/codegen.py | 2 +- miasm/jitter/llvmconvert.py | 2 +- test/arch/mep/asm/test_asm.py | 4 ++-- test/arch/mep/asm/test_major_opcode_4.py | 2 +- 9 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.codespell_ignore b/.codespell_ignore index 8eab9f6f3..06b8df87b 100644 --- a/.codespell_ignore +++ b/.codespell_ignore @@ -5,3 +5,5 @@ mye iff nto rela +daa +od diff --git a/miasm/analysis/data_flow.py b/miasm/analysis/data_flow.py index c86bece55..be0e45288 100644 --- a/miasm/analysis/data_flow.py +++ b/miasm/analysis/data_flow.py @@ -185,7 +185,7 @@ def add_uniq_labeled_edge(self, src, dst, edge_label): self._edge_attr[(src, dst)] = edge_label def add_data_edge(self, src, dst): - """Adds an edge representing a data dependencie + """Adds an edge representing a data dependency and sets the label accordingly""" self.add_uniq_labeled_edge(src, dst, ATTR_DEP) diff --git a/miasm/analysis/depgraph.py b/miasm/analysis/depgraph.py index 219a32ee3..80e94c7f5 100644 --- a/miasm/analysis/depgraph.py +++ b/miasm/analysis/depgraph.py @@ -357,7 +357,7 @@ def _gen_path_constraints(self, translator, expr, expected): conds = z3.Or(*out) else: # Ex: expr: lblgen1, expected: 0x1234 - # -> Avoid unconsistent solution lblgen1 = 0x1234 + # -> Avoid inconsistent solution lblgen1 = 0x1234 conds = translator.from_expr(self.unsat_expr) return conds diff --git a/miasm/arch/mep/arch.py b/miasm/arch/mep/arch.py index 171f5fab0..8a9f60fd0 100644 --- a/miasm/arch/mep/arch.py +++ b/miasm/arch/mep/arch.py @@ -293,7 +293,7 @@ class mn_mep(cls_mn): """ # Define variables that stores information used to disassemble & assemble - # Notes: - theses variables are mandatory + # Notes: - these variables are mandatory # - they could be moved to the cls_mn class num = 0 # holds the number of mnemonics diff --git a/miasm/core/graph.py b/miasm/core/graph.py index f585379bb..01f580a35 100644 --- a/miasm/core/graph.py +++ b/miasm/core/graph.py @@ -978,7 +978,7 @@ def match(self, graph): """ # Partial solution: nodes corrects, edges between these nodes corrects # A partial solution is a dictionary MatchGraphJoker -> @graph's node - todo = list() # Dictionnaries containing partial solution + todo = list() # Dictionaries containing partial solution done = list() # Already computed partial solutions # Elect first candidates diff --git a/miasm/jitter/codegen.py b/miasm/jitter/codegen.py index 792feae0a..abbf65d2e 100644 --- a/miasm/jitter/codegen.py +++ b/miasm/jitter/codegen.py @@ -187,7 +187,7 @@ def block2assignblks(self, block): def add_local_var(self, dst_var, dst_index, expr): """ - Add local variable used to store temporay result + Add local variable used to store temporary result @dst_var: dictionary of Expr -> local_var_expr @dst_index : dictionary of size -> local var count @expr: Expression source diff --git a/miasm/jitter/llvmconvert.py b/miasm/jitter/llvmconvert.py index d0e0407bc..c44674119 100644 --- a/miasm/jitter/llvmconvert.py +++ b/miasm/jitter/llvmconvert.py @@ -1720,7 +1720,7 @@ def from_asmblock(self, asmblock): self.gen_bad_block(asmblock) return - # Create basic blocks (for label branchs) + # Create basic blocks (for label branches) entry_bbl, builder = self.entry_bbl, self.builder for instr in asmblock.lines: lbl = self.llvm_context.ir_arch.loc_db.get_or_create_offset_location(instr.offset) diff --git a/test/arch/mep/asm/test_asm.py b/test/arch/mep/asm/test_asm.py index 7762669a8..e8b8afb98 100644 --- a/test/arch/mep/asm/test_asm.py +++ b/test/arch/mep/asm/test_asm.py @@ -22,12 +22,12 @@ def test(self): for mn_str, mn_hex in unit_tests: print("-" * 49) # Tests separation - # Dissassemble + # Disassemble mn_bin = decode_hex(mn_hex) mn = mn_mep.dis(mn_bin, "b") print("dis: %s -> %s" % (mn_hex.rjust(20), str(mn).rjust(20))) - assert(str(mn) == mn_str) # dissassemble assertion + assert(str(mn) == mn_str) # disassemble assertion # Assemble and return all possible candidates instr = mn_mep.fromstring(str(mn), "b") diff --git a/test/arch/mep/asm/test_major_opcode_4.py b/test/arch/mep/asm/test_major_opcode_4.py index a6f57ac26..fd466b62f 100644 --- a/test/arch/mep/asm/test_major_opcode_4.py +++ b/test/arch/mep/asm/test_major_opcode_4.py @@ -107,7 +107,7 @@ def test_LBU(self): check_instruction("LBU $4, 0x22($TP)", "4ca2", multi=2) # Note: the following instruction can not be easily manipulated due to # expressions simplifications performed by miasm at assembly and - # dissassembly, i.e. ExprMem($TP + 0) is simplified into ExprMem($TP) + # disassembly, i.e. ExprMem($TP + 0) is simplified into ExprMem($TP) #check_instruction("LBU $6, 0x0($TP)", "4e80", multi=2) check_instruction("LBU $7, 0x3C($TP)", "4fbc", multi=2) check_instruction("LBU $2, 0x4($TP)", "4a84", multi=2)