Make use of xdis routines in disassembly

This commit is contained in:
rocky
2016-05-29 23:02:31 -04:00
parent 69bb74c86e
commit 08790ab0ab
2 changed files with 28 additions and 90 deletions

View File

@@ -34,7 +34,7 @@ def main():
Usage_short = """usage: %s FILE...
Type -h for for full help.""" % program
use_uncompyle6_format = False
native = True
if len(sys.argv) == 1:
print("No file(s) given", file=sys.stderr)
@@ -56,7 +56,7 @@ Type -h for for full help.""" % program
print("%s %s" % (program, VERSION))
sys.exit(0)
elif opt in ('-U', '--uncompyle6'):
use_uncompyle6_format = True
native = False
else:
print(opt)
print(Usage_short, file=sys.stderr)
@@ -65,7 +65,7 @@ Type -h for for full help.""" % program
for file in files:
if os.path.exists(files[0]):
disassemble_file(file, sys.stdout, use_uncompyle6_format)
disassemble_file(file, sys.stdout, native)
else:
print("Can't read %s - skipping" % files[0],
file=sys.stderr)