OLD | NEW |
---|---|
1 #!/usr/bin/env python2 | 1 #!/usr/bin/env python2 |
2 | 2 |
3 import argparse | 3 import argparse |
4 import itertools | 4 import itertools |
5 import os | 5 import os |
6 import re | 6 import re |
7 import subprocess | 7 import subprocess |
8 import sys | 8 import sys |
9 import tempfile | 9 import tempfile |
10 | 10 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
195 asm_temp = tempfile.NamedTemporaryFile(delete=False) | 195 asm_temp = tempfile.NamedTemporaryFile(delete=False) |
196 asm_temp.close() | 196 asm_temp.close() |
197 output_file_name = asm_temp.name | 197 output_file_name = asm_temp.name |
198 if args.assemble and args.filetype != 'obj': | 198 if args.assemble and args.filetype != 'obj': |
199 cmd += (['|', os.path.join(pnacl_bin_path, 'llvm-mc')] + | 199 cmd += (['|', os.path.join(pnacl_bin_path, 'llvm-mc')] + |
200 TargetAssemblerFlags(args.target, args.sandbox) + | 200 TargetAssemblerFlags(args.target, args.sandbox) + |
201 ['-filetype=obj', '-o', output_file_name]) | 201 ['-filetype=obj', '-o', output_file_name]) |
202 elif output_file_name: | 202 elif output_file_name: |
203 cmd += ['-o', output_file_name] | 203 cmd += ['-o', output_file_name] |
204 if args.disassemble: | 204 if args.disassemble: |
205 # Show wide instruction encodings, diassemble, and show relocs. | 205 # Show wide instruction encodings, diassemble, and show relocs. |
Jim Stichnoth
2016/09/15 05:24:20
Update the comment for '-z' ?
obucinac
2016/09/15 10:44:55
Done.
| |
206 cmd += (['&&', os.path.join(pnacl_bin_path, GetObjdumpCmd())] + | 206 cmd += (['&&', os.path.join(pnacl_bin_path, GetObjdumpCmd())] + |
207 args.dis_flags + | 207 args.dis_flags + |
208 ['-w', '-d', '-r'] + TargetDisassemblerFlags(args.target) + | 208 ['-w', '-d', '-r', '-z'] + TargetDisassemblerFlags(args.target) + |
209 [output_file_name]) | 209 [output_file_name]) |
210 | 210 |
211 stdout_result = shellcmd(cmd, echo=args.echo_cmd) | 211 stdout_result = shellcmd(cmd, echo=args.echo_cmd) |
212 if not args.echo_cmd: | 212 if not args.echo_cmd: |
213 sys.stdout.write(stdout_result) | 213 sys.stdout.write(stdout_result) |
214 if asm_temp and not keep_output_file: | 214 if asm_temp and not keep_output_file: |
215 os.remove(output_file_name) | 215 os.remove(output_file_name) |
216 | 216 |
217 if __name__ == '__main__': | 217 if __name__ == '__main__': |
218 main() | 218 main() |
OLD | NEW |