OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright 2015 The Crashpad Authors. All rights reserved. | 3 # Copyright 2015 The Crashpad Authors. All rights reserved. |
4 # | 4 # |
5 # Licensed under the Apache License, Version 2.0 (the "License"); | 5 # Licensed under the Apache License, Version 2.0 (the "License"); |
6 # you may not use this file except in compliance with the License. | 6 # you may not use this file except in compliance with the License. |
7 # You may obtain a copy of the License at | 7 # You may obtain a copy of the License at |
8 # | 8 # |
9 # http://www.apache.org/licenses/LICENSE-2.0 | 9 # http://www.apache.org/licenses/LICENSE-2.0 |
10 # | 10 # |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 out.Check(r'ntdll\.dll', 'ntdll present', re.IGNORECASE) | 240 out.Check(r'ntdll\.dll', 'ntdll present', re.IGNORECASE) |
241 | 241 |
242 # Check that there is no stack trace in the self-destroyed process. Confirm | 242 # Check that there is no stack trace in the self-destroyed process. Confirm |
243 # that the top is where we expect it (that's based only on IP), but subsequent | 243 # that the top is where we expect it (that's based only on IP), but subsequent |
244 # stack entries will not be available. This confirms that we have a mostly | 244 # stack entries will not be available. This confirms that we have a mostly |
245 # valid dump, but that the stack was omitted. | 245 # valid dump, but that the stack was omitted. |
246 out.Check(r'self_destroying_program!crashpad::`anonymous namespace\'::' | 246 out.Check(r'self_destroying_program!crashpad::`anonymous namespace\'::' |
247 r'FreeOwnStackAndBreak.*\nquit:', | 247 r'FreeOwnStackAndBreak.*\nquit:', |
248 'at correct location, no additional stack entries') | 248 'at correct location, no additional stack entries') |
249 | 249 |
250 out = CdbRun(cdb_path, dump_path, '.ecxr; db /c14 edi') | 250 out = CdbRun(cdb_path, dump_path, '.ecxr; ~1s; db /c14 edi') |
251 out.Check(r'63 62 61 60 5f 5e 5d 5c-5b 5a 59 58 57 56 55 54 53 52 51 50', | 251 out.Check(r'63 62 61 60 5f 5e 5d 5c-5b 5a 59 58 57 56 55 54 53 52 51 50', |
252 'data pointed to by registers captured') | 252 'data pointed to by registers captured') |
253 | 253 |
254 if z7_dump_path: | 254 if z7_dump_path: |
255 out = CdbRun(cdb_path, z7_dump_path, '.ecxr;lm') | 255 out = CdbRun(cdb_path, z7_dump_path, '.ecxr;lm') |
256 out.Check('This dump file has an exception of interest stored in it', | 256 out.Check('This dump file has an exception of interest stored in it', |
257 'captured exception in z7 module') | 257 'captured exception in z7 module') |
258 # Older versions of cdb display relative to exports for /Z7 modules, newer | 258 # Older versions of cdb display relative to exports for /Z7 modules, newer |
259 # ones just display the offset. | 259 # ones just display the offset. |
260 out.Check(r'z7_test(!CrashMe\+0xe|\+0x100e):', | 260 out.Check(r'z7_test(!CrashMe\+0xe|\+0x100e):', |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 z7_dump_path, | 310 z7_dump_path, |
311 pipe_name) | 311 pipe_name) |
312 | 312 |
313 return 0 | 313 return 0 |
314 finally: | 314 finally: |
315 CleanUpTempDirs() | 315 CleanUpTempDirs() |
316 | 316 |
317 | 317 |
318 if __name__ == '__main__': | 318 if __name__ == '__main__': |
319 sys.exit(main(sys.argv[1:])) | 319 sys.exit(main(sys.argv[1:])) |
OLD | NEW |