fix bug when no micro arch was given

This commit is contained in:
JanLJL
2025-03-04 17:42:05 +01:00
parent 34fef3823b
commit 62908f3b8f

View File

@@ -341,9 +341,7 @@ def inspect(args, output_file=sys.stdout):
if args.arch: if args.arch:
archs_to_try = [args.arch] archs_to_try = [args.arch]
else: else:
archs_to_try = list(DEFAULT_ARCHS) archs_to_try = [detected_arch]
archs_to_try.remove(detected_arch)
archs_to_try.append(detected_arch)
if args.syntax: if args.syntax:
syntaxes_to_try = [args.syntax] syntaxes_to_try = [args.syntax]
else: else:
@@ -462,7 +460,7 @@ def run(args, output_file=sys.stdout):
@lru_cache() @lru_cache()
def get_asm_parser(arch, syntax) -> BaseParser: def get_asm_parser(arch, syntax="ATT") -> BaseParser:
""" """
Helper function to create the right parser for a specific architecture. Helper function to create the right parser for a specific architecture.