Skip to content

Commit 1ba37c3

Browse files
authored
Merge pull request #1474 from DimitriPapadopoulos/codespell
Fix typos found by codespell
2 parents 319229f + 46a201e commit 1ba37c3

File tree

10 files changed

+16
-16
lines changed

10 files changed

+16
-16
lines changed

doc/ir/lift.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,7 @@
17291729
"\n",
17301730
"```\n",
17311731
"\n",
1732-
"This is the generic code used in `x86_64` to model function calls. But you can finely model functions. For example, suppose you are analysing code on `x86_32` with `stdcall` convention. Suppose you know the callee clean its stack arguments. Supppose as well you know for each function how many arguments it has. You can then customize the model to match the callee and compute the correct stack modification, as well as getting the arguments from stack:\n",
1732+
"This is the generic code used in `x86_64` to model function calls. But you can finely model functions. For example, suppose you are analysing code on `x86_32` with `stdcall` convention. Suppose you know the callee clean its stack arguments. Suppose as well you know for each function how many arguments it has. You can then customize the model to match the callee and compute the correct stack modification, as well as getting the arguments from stack:\n",
17331733
"\n",
17341734
"\n",
17351735
"\n"

doc/locationdb/locationdb.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
"metadata": {},
66
"source": [
77
"# LocationDB object \n",
8-
"The `LocationDB` is the Miasm object responsible of the symbols' management. A `Location` is an object representing a code or data (or anywhere else) position. As the name explicits it, the `LocationDB` is a database of locations. Here are some rules:\n",
8+
"The `LocationDB` is the Miasm object responsible of the symbols' management. A `Location` is an object representing a code or data (or anywhere else) position. As the name says, the `LocationDB` is a database of locations. Here are some rules:\n",
99
"- each location has exactly *one* associated `LocKey`\n",
1010
"- a `LocKey` is linked to a unique `LocationDB` (and must not be used in another `LocationDB`)\n",
1111
"- a `LocKey` is very similar to primary key object in a database.\n",
1212
"- a `LocKey` can have an optional *offset*.\n",
1313
"- a `LocKey` can have multiple symbol names\n",
14-
"- two `Lockey`s cannot share an identic offset\n",
14+
"- two `Lockey`s cannot share an identical offset\n",
1515
"- two `LocKey`s cannot share a symbol name\n",
1616
"\n",
1717
"Below are manipulations of the `LocationDB`"

example/disasm/dis_binary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
loc_db = LocationDB()
99

1010
# The Container will provide a *bin_stream*, bytes source for the disasm engine
11-
# It will prodive a view from a PE or an ELF.
11+
# It will provide a view from a PE or an ELF.
1212
cont = Container.from_stream(fdesc, loc_db)
1313

1414
# The Machine, instantiated with the detected architecture, will provide tools

miasm/analysis/data_flow.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1910,7 +1910,7 @@ def __ne__(self, other):
19101910

19111911
def may_interfer(self, dsts, src):
19121912
"""
1913-
Return True is @src may interfer with expressions in @dsts
1913+
Return True if @src may interfere with expressions in @dsts
19141914
@dsts: Set of Expressions
19151915
@src: expression to test
19161916
"""
@@ -2085,7 +2085,7 @@ def eval_assignblock(self, assignblock):
20852085
to_del = set()
20862086
for node in list(classes.nodes()):
20872087
if self.may_interfer(dsts, node):
2088-
# Interfer with known equivalence class
2088+
# Interfere with known equivalence class
20892089
self.equivalence_classes.del_element(node)
20902090
if node.is_id() or node.is_mem():
20912091
self.undefined.add(node)
@@ -2137,7 +2137,7 @@ def merge(self, other):
21372137
undefined = set(node for node in self.undefined if node.is_id() or node.is_mem())
21382138
undefined.update(set(node for node in other.undefined if node.is_id() or node.is_mem()))
21392139
# Should we compute interference between srcs and undefined ?
2140-
# Nop => should already interfer in other state
2140+
# Nop => should already interfere in other state
21412141
components1 = classes1.get_classes()
21422142
components2 = classes2.get_classes()
21432143

@@ -2173,7 +2173,7 @@ def merge(self, other):
21732173
continue
21742174
if common:
21752175
# Intersection contains multiple nodes
2176-
# Here, common nodes don't interfer with any undefined
2176+
# Here, common nodes don't interfere with any undefined
21772177
nodes_ok.update(common)
21782178
out.append(common)
21792179
diff = component1.difference(common)

miasm/arch/mep/regs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
csr_exprs, csr_inits, csr_infos = gen_regs(csr_names, globals())
4545

4646
# Define aliases to control/special registers
47-
PC = csr_exprs[0] # Program Conter. On MeP, it is the special register R0
47+
PC = csr_exprs[0] # Program Counter. On MeP, it is the special register R0
4848
LP = csr_exprs[1] # Link Pointer. On MeP, it is the special register R1
4949
SAR = csr_exprs[2] # Shift Amount Register. On MeP, it is the special register R2
5050
RPB = csr_exprs[4] # Repeat Begin. On MeP, it is the special register R4

miasm/arch/x86/sem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5057,7 +5057,7 @@ def ldmxcsr(ir, instr, dst):
50575057

50585058

50595059
def _select4(src, control):
5060-
# Implementation inspired from Intel Intrisics Guide
5060+
# Implementation inspired from Intel Intrinsics Guide
50615061
# @control is already resolved (was an immediate)
50625062

50635063
if control == 0:

miasm/expression/expression_helper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def merge_sliceto_slice(expr):
8989
def is_pure_int(e):
9090
"""
9191
return True if expr is only composed with integers
92-
[!] ExprCond returns True is src1 and src2 are integers
92+
[!] ExprCond returns True if src1 and src2 are integers
9393
"""
9494
def modify_cond(e):
9595
if isinstance(e, m2_expr.ExprCond):
@@ -344,7 +344,7 @@ class ExprRandom(object):
344344
compose_max_layer = 5
345345
# Maximum size of memory address in bits
346346
memory_max_address_size = 32
347-
# Re-use already generated elements to mimic a more realistic behavior
347+
# Reuse already generated elements to mimic a more realistic behavior
348348
reuse_element = True
349349
generated_elements = {} # (depth, size) -> [Expr]
350350

@@ -450,7 +450,7 @@ def _gen(cls, size=32, depth=1):
450450
if not cls.perfect_tree:
451451
depth = random.randint(max(0, depth - 2), depth)
452452

453-
# Element re-use
453+
# Element reuse
454454
if cls.reuse_element and random.choice([True, False]) and \
455455
(depth, size) in cls.generated_elements:
456456
return random.choice(cls.generated_elements[(depth, size)])

miasm/jitter/jitload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ def init_stack(self):
476476
def get_exception(self):
477477
return self.cpu.get_exception() | self.vm.get_exception()
478478

479-
# commun functions
479+
# common functions
480480
def get_c_str(self, addr, max_char=None):
481481
"""Get C str from vm.
482482
@addr: address in memory

miasm/loader/pe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ def get_funcrva(self, func):
11101110
if isfromva(tmp_thunk[j].rva & 0x7FFFFFFF) == func:
11111111
return isfromva(entry.firstthunk) + j * 4
11121112
else:
1113-
raise ValueError('unknown func tpye %r' % func)
1113+
raise ValueError('unknown func type %r' % func)
11141114

11151115
def get_funcvirt(self, addr):
11161116
rva = self.get_funcrva(addr)

test/arch/mep/ir/test_loadstore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def test_sw(self):
8383
[(ExprMem(ExprInt(0x1010, 32), 32), ExprInt(0xABC7, 32))])
8484

8585
def test_lb(self):
86-
"""Test LB executon"""
86+
"""Test LB execution"""
8787

8888
# LB Rn,(Rm)
8989
exec_instruction("LB R1, (R2)",

0 commit comments

Comments
 (0)