tests: ida: address comments

This commit is contained in:
William Ballenthin
2020-07-25 11:40:04 -06:00
parent b6c9540469
commit 7236283b2f
2 changed files with 4 additions and 1 deletions

View File

@@ -149,6 +149,9 @@ def extract_insn_offset_features(f, bb, insn):
# mov esi, dword_1005B148[esi]
continue
# I believe that IDA encodes all offsets as two's complement in a u32.
# a 64-bit displacement isn't a thing, see:
# https://stackoverflow.com/questions/31853189/x86-64-assembly-why-displacement-not-64-bits
op_off = capa.features.extractors.helpers.twos_complement(op_off, 32)
yield Offset(op_off), insn.ea

View File

@@ -273,7 +273,7 @@ def test_basic_block_count():
if __name__ == "__main__":
print("-" * 80)
# invoke all functions in this module that start with `parse_`
# invoke all functions in this module that start with `test_`
for name in dir(sys.modules[__name__]):
if not name.startswith("test_"):
continue