Skip to content

Commit e89a1ba

Browse files
RoboSchmiedelicn
authored andcommitted
fix 20 typos
Signed-off-by: RoboSchmied <[email protected]>
1 parent 04e42e0 commit e89a1ba

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

qiling/arch/arch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def assembler(self) -> Ks:
131131
@property
132132
@abstractmethod
133133
def endian(self) -> QL_ENDIAN:
134-
"""Get processor endianess.
134+
"""Get processor endianness.
135135
"""
136136

137137
pass

qiling/arch/arm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def __cached_disasm(self, mode: int) -> Cs:
8383

8484
@property
8585
def disassembler(self) -> Cs:
86-
# note: since endianess and thumb mode might change during execution, we cannot
86+
# note: since endianness and thumb mode might change during execution, we cannot
8787
# cache the disassembler instance directly; rather we pick the appropriate cached
8888
# instance
8989

@@ -103,7 +103,7 @@ def __cached_asm(self, mode: int) -> Ks:
103103

104104
@property
105105
def assembler(self) -> Ks:
106-
# note: since endianess and thumb mode might change during execution, we cannot
106+
# note: since endianness and thumb mode might change during execution, we cannot
107107
# cache the assembler instance directly; rather we pick the appropriate cached
108108
# instance
109109

qiling/arch/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ def ql_hook_block_disasm(ql: Qiling, address: int, size: int):
100100

101101
# used by qltool prior to ql instantiation. to get an assembler object
102102
# after ql instantiation, use the appropriate ql.arch method
103-
def assembler(arch: QL_ARCH, endianess: QL_ENDIAN, is_thumb: bool) -> Ks:
103+
def assembler(arch: QL_ARCH, endianness: QL_ENDIAN, is_thumb: bool) -> Ks:
104104
"""Instantiate an assembler object for a specified architecture.
105105
106106
Args:
107107
arch: architecture type
108-
endianess: architecture endianess
108+
endianness: architecture endianness
109109
is_thumb: thumb mode for ARM (ignored otherwise)
110110
111111
Returns: an assembler object
@@ -114,7 +114,7 @@ def assembler(arch: QL_ARCH, endianess: QL_ENDIAN, is_thumb: bool) -> Ks:
114114
endian = {
115115
QL_ENDIAN.EL: KS_MODE_LITTLE_ENDIAN,
116116
QL_ENDIAN.EB: KS_MODE_BIG_ENDIAN
117-
}[endianess]
117+
}[endianness]
118118

119119
thumb = KS_MODE_THUMB if is_thumb else 0
120120

qiling/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ def __init__(
146146
if ostype is None:
147147
raise QlErrorOsType(f'Unknown or unsupported operating system')
148148

149-
# if endianess is still undetermined, set it to little-endian.
150-
# this setting is ignored for architectures with predefined endianess
149+
# if endianness is still undetermined, set it to little-endian.
150+
# this setting is ignored for architectures with predefined endianness
151151
if endian is None:
152152
endian = QL_ENDIAN.EL
153153

@@ -749,7 +749,7 @@ def emu_start(self, begin: int, end: int, timeout: int = 0, count: int = 0):
749749
# was initialized with.
750750
#
751751
# either unicorn is patched to reflect thumb mode in cpsr upon initialization, or we pursue the same logic
752-
# by determining the endianess by address lsb. either way this condition should not be here
752+
# by determining the endianness by address lsb. either way this condition should not be here
753753
if getattr(self.arch, '_init_thumb', False):
754754
begin |= 0b1
755755

qiling/debugger/gdb/gdb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,11 @@ def __set_reg_value(reg: Optional[int], pos: int, nibbles: int, hexval: str) ->
159159
val = int(hexval, 16)
160160

161161
if self.ql.arch.endian == QL_ENDIAN.EL:
162-
val = __swap_endianess(val)
162+
val = __swap_endianness(val)
163163

164164
self.ql.arch.regs.write(reg, val)
165165

166-
def __swap_endianess(value: int) -> int:
166+
def __swap_endianness(value: int) -> int:
167167
length = (value.bit_length() + 7) // 8
168168
raw = value.to_bytes(length, 'little')
169169

qiling/os/struct.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def get_aligned_union(archbits: int):
247247
"""Provide an aligned union class based on the emulated architecture
248248
properties. This class does not inherit the special BaseStruct methods.
249249
250-
FIXME: ctypes.Union endianess cannot be set arbitrarily, rather it depends
250+
FIXME: ctypes.Union endianness cannot be set arbitrarily, rather it depends
251251
on the hosting system. ctypes.LittleEndianUnion and ctypes.BigEndianUnion
252252
are available only starting from Python 3.11
253253

qiling/utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def __emu_env_from_elf(path: str) -> Tuple[Optional[QL_ARCH], Optional[QL_OS], O
131131
EM_RISCV = 243
132132
EM_PPC = 20
133133

134-
endianess = {
134+
endianness = {
135135
ELFDATA2LSB: (QL_ENDIAN.EL, 'little'),
136136
ELFDATA2MSB: (QL_ENDIAN.EB, 'big')
137137
}
@@ -181,14 +181,14 @@ def __emu_env_from_elf(path: str) -> Tuple[Optional[QL_ARCH], Optional[QL_OS], O
181181

182182
if e_ident[:4] == b'\x7fELF':
183183
ei_class = e_ident[4] # arch bits
184-
ei_data = e_ident[5] # arch endianess
184+
ei_data = e_ident[5] # arch endianness
185185
ei_osabi = e_ident[7]
186186

187187
if ei_class in classes:
188188
machines = classes[ei_class]
189189

190-
if ei_data in endianess:
191-
archendian, endian = endianess[ei_data]
190+
if ei_data in endianness:
191+
archendian, endian = endianness[ei_data]
192192

193193
machine = int.from_bytes(e_machine, endian)
194194

@@ -375,12 +375,12 @@ def __int_nothrow(v: str, /) -> Optional[int]:
375375
def select_arch(archtype: QL_ARCH, cputype: Optional[QL_CPU], endian: QL_ENDIAN, thumb: bool) -> QlClassInit['QlArch']:
376376
kwargs = {'cputype': cputype}
377377

378-
# set endianess and thumb mode for arm-based archs
378+
# set endianness and thumb mode for arm-based archs
379379
if archtype is QL_ARCH.ARM:
380380
kwargs['endian'] = endian
381381
kwargs['thumb'] = thumb
382382

383-
# set endianess for mips arch
383+
# set endianness for mips arch
384384
elif archtype is QL_ARCH.MIPS:
385385
kwargs['endian'] = endian
386386

qltool

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def run():
205205
code_parser.add_argument('-i', '--input', metavar="INPUT", dest="input", help='input hex value')
206206
code_parser.add_argument('--arch', required=True, choices=arch_map, action=__arg_archtype)
207207
code_parser.add_argument('--thumb', action='store_true', default=False, help='specify thumb mode for ARM')
208-
code_parser.add_argument('--endian', choices=endian_map, default=QL_ENDIAN.EL, action=__arg_endian, help='specify endianess for bi-endian archs')
208+
code_parser.add_argument('--endian', choices=endian_map, default=QL_ENDIAN.EL, action=__arg_endian, help='specify endianness for bi-endian archs')
209209
code_parser.add_argument('--os', required=True, choices=os_map, action=__arg_ostype)
210210
code_parser.add_argument('--rootfs', default='.', help='emulated root filesystem, that is where all libraries reside')
211211
code_parser.add_argument('--format', choices=('asm', 'hex', 'bin'), default='bin', help='input file format')

0 commit comments

Comments
 (0)