OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2016 the V8 project authors. All rights reserved. | 3 # Copyright 2016 the V8 project authors. All rights reserved. |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 with codefile: | 66 with codefile: |
67 printing = False | 67 printing = False |
68 for line in codefile: | 68 for line in codefile: |
69 if line.startswith("0x"): | 69 if line.startswith("0x"): |
70 addr = int(line.split()[0], 0) | 70 addr = int(line.split()[0], 0) |
71 if start <= addr <= end: | 71 if start <= addr <= end: |
72 printing = True | 72 printing = True |
73 sys.stdout.write(format_line(line)) | 73 sys.stdout.write(format_line(line)) |
74 elif printing: | 74 elif printing: |
75 break | 75 break |
76 elif printing and not is_comment(line): | 76 elif printing: |
77 break | 77 if not is_comment(line): |
| 78 break |
| 79 else: |
| 80 sys.stdout.write(line) |
78 else: | 81 else: |
79 sys.argv[0] = "objdump" | 82 sys.argv[0] = "objdump" |
80 sys.exit(subprocess.call(sys.argv)) | 83 sys.exit(subprocess.call(sys.argv)) |
81 | 84 |
82 if __name__ == "__main__": | 85 if __name__ == "__main__": |
83 main() | 86 main() |
OLD | NEW |