OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 struct __attribute__((packed, aligned(4))) MINIDUMP_EXCEPTION { | 403 struct __attribute__((packed, aligned(4))) MINIDUMP_EXCEPTION { |
404 //! \brief The top-level exception code identifying the exception, in | 404 //! \brief The top-level exception code identifying the exception, in |
405 //! operating system-specific values. | 405 //! operating system-specific values. |
406 //! | 406 //! |
407 //! For Mac OS X minidumps, this will be an \ref EXC_x "EXC_*" exception type, | 407 //! For Mac OS X minidumps, this will be an \ref EXC_x "EXC_*" exception type, |
408 //! such as `EXC_BAD_ACCESS`. `EXC_CRASH` will not appear here for exceptions | 408 //! such as `EXC_BAD_ACCESS`. `EXC_CRASH` will not appear here for exceptions |
409 //! processed as `EXC_CRASH` when generated from another preceding exception: | 409 //! processed as `EXC_CRASH` when generated from another preceding exception: |
410 //! the original exception code will appear instead. The exception type as it | 410 //! the original exception code will appear instead. The exception type as it |
411 //! was received will appear at index 0 of #ExceptionInformation. | 411 //! was received will appear at index 0 of #ExceptionInformation. |
412 //! | 412 //! |
| 413 //! For Windows minidumps, this will be an \ref EXCEPTION_x "EXCEPTION_*" |
| 414 //! exception type, such as `EXCEPTION_ACCESS_VIOLATION`. |
| 415 //! |
413 //! \note This field is named ExceptionCode, but what is known as the | 416 //! \note This field is named ExceptionCode, but what is known as the |
414 //! “exception code” on Mac OS X/Mach is actually stored in the | 417 //! “exception code” on Mac OS X/Mach is actually stored in the |
415 //! #ExceptionFlags field of a minidump file. | 418 //! #ExceptionFlags field of a minidump file. |
416 //! | 419 //! |
417 //! \todo Document the possible values by OS. There may be OS-specific enums | 420 //! \todo Document the possible values by OS. There may be OS-specific enums |
418 //! in minidump_extensions.h. | 421 //! in minidump_extensions.h. |
419 uint32_t ExceptionCode; | 422 uint32_t ExceptionCode; |
420 | 423 |
421 //! \brief Additional exception flags that further identify the exception, in | 424 //! \brief Additional exception flags that further identify the exception, in |
422 //! operating system-specific values. | 425 //! operating system-specific values. |
423 //! | 426 //! |
424 //! For Mac OS X minidumps, this will be the value of the exception code at | 427 //! For Mac OS X minidumps, this will be the value of the exception code at |
425 //! index 0 as received by a Mach exception handler, except: | 428 //! index 0 as received by a Mach exception handler, except: |
426 //! * For exception type `EXC_CRASH` generated from another preceding | 429 //! * For exception type `EXC_CRASH` generated from another preceding |
427 //! exception, the original exception code will appear here, not the code | 430 //! exception, the original exception code will appear here, not the code |
428 //! as received by the Mach exception handler. | 431 //! as received by the Mach exception handler. |
429 //! * For exception types `EXC_RESOURCE` and `EXC_GUARD`, the high 32 bits of | 432 //! * For exception types `EXC_RESOURCE` and `EXC_GUARD`, the high 32 bits of |
430 //! the code received by the Mach exception handler will appear here. | 433 //! the code received by the Mach exception handler will appear here. |
431 //! | 434 //! |
432 //! In all cases for Mac OS X minidumps, the code as it was received by the | 435 //! In all cases for Mac OS X minidumps, the code as it was received by the |
433 //! Mach exception handler will appear at index 1 of #ExceptionInformation. | 436 //! Mach exception handler will appear at index 1 of #ExceptionInformation. |
434 //! | 437 //! |
| 438 //! For Windows minidumps, this will either be `0` if the exception is |
| 439 //! continuable, or `EXCEPTION_NONCONTINUABLE` to indicate a noncontinuable |
| 440 //! exception. |
| 441 //! |
435 //! \todo Document the possible values by OS. There may be OS-specific enums | 442 //! \todo Document the possible values by OS. There may be OS-specific enums |
436 //! in minidump_extensions.h. | 443 //! in minidump_extensions.h. |
437 uint32_t ExceptionFlags; | 444 uint32_t ExceptionFlags; |
438 | 445 |
439 //! \brief An address, in the address space of the process that this minidump | 446 //! \brief An address, in the address space of the process that this minidump |
440 //! file contains a snapshot of, of another MINIDUMP_EXCEPTION. This field | 447 //! file contains a snapshot of, of another MINIDUMP_EXCEPTION. This field |
441 //! is used for nested exceptions. | 448 //! is used for nested exceptions. |
442 uint64_t ExceptionRecord; | 449 uint64_t ExceptionRecord; |
443 | 450 |
444 //! \brief The address that caused the exception. | 451 //! \brief The address that caused the exception. |
445 //! | 452 //! |
446 //! This may be the address that caused a fault on data access, or it may be | 453 //! This may be the address that caused a fault on data access, or it may be |
447 //! the instruction pointer that contained an offending instruction. | 454 //! the instruction pointer that contained an offending instruction. |
448 uint64_t ExceptionAddress; | 455 uint64_t ExceptionAddress; |
449 | 456 |
450 //! \brief The number of valid elements in #ExceptionInformation. | 457 //! \brief The number of valid elements in #ExceptionInformation. |
451 uint32_t NumberParameters; | 458 uint32_t NumberParameters; |
452 | 459 |
453 uint32_t __unusedAlignment; | 460 uint32_t __unusedAlignment; |
454 | 461 |
455 //! \brief Additional information about the exception, specific to the | 462 //! \brief Additional information about the exception, specific to the |
456 //! operating system and possibly the #ExceptionCode. | 463 //! operating system and possibly the #ExceptionCode. |
457 //! | 464 //! |
458 //! For Mac OS X minidumps, this will contain the exception type as received | 465 //! For Mac OS X minidumps, this will contain the exception type as received |
459 //! by a Mach exception handler and the values of the `codes[0]` and | 466 //! by a Mach exception handler and the values of the `codes[0]` and |
460 //! `codes[1]` (exception code and subcode) parameters supplied to the Mach | 467 //! `codes[1]` (exception code and subcode) parameters supplied to the Mach |
461 //! exception handler. Unlike #ExceptionCode and #ExceptionFlags, the values | 468 //! exception handler. Unlike #ExceptionCode and #ExceptionFlags, the values |
462 //! received by a Mach exception handler are used directly here even for the | 469 //! received by a Mach exception handler are used directly here even for the |
463 //! `EXC_CRASH`, `EXC_RESOURCE`, and `EXC_GUARD` exception types. | 470 //! `EXC_CRASH`, `EXC_RESOURCE`, and `EXC_GUARD` exception types. |
| 471 |
| 472 //! For Windows, these are additional arguments (if any) as provided to |
| 473 //! `RaiseException()`. |
464 uint64_t ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; | 474 uint64_t ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; |
465 }; | 475 }; |
466 | 476 |
467 //! \brief Information about the exception that triggered a minidump file’s | 477 //! \brief Information about the exception that triggered a minidump file’s |
468 //! generation. | 478 //! generation. |
469 struct __attribute__((packed, aligned(4))) MINIDUMP_EXCEPTION_STREAM { | 479 struct __attribute__((packed, aligned(4))) MINIDUMP_EXCEPTION_STREAM { |
470 //! \brief The ID of the thread that caused the exception. | 480 //! \brief The ID of the thread that caused the exception. |
471 //! | 481 //! |
472 //! \sa MINIDUMP_THREAD::ThreadId | 482 //! \sa MINIDUMP_THREAD::ThreadId |
473 uint32_t ThreadId; | 483 uint32_t ThreadId; |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 //! - A MINIDUMP_MODULE_LIST stream. All loaded modules are present. | 854 //! - A MINIDUMP_MODULE_LIST stream. All loaded modules are present. |
845 //! - Typically, a MINIDUMP_MEMORY_LIST stream containing duplicate pointers | 855 //! - Typically, a MINIDUMP_MEMORY_LIST stream containing duplicate pointers |
846 //! to the stack memory regions also referenced by the MINIDUMP_THREAD_LIST | 856 //! to the stack memory regions also referenced by the MINIDUMP_THREAD_LIST |
847 //! stream. This type of minidump file also includes a | 857 //! stream. This type of minidump file also includes a |
848 //! MINIDUMP_MEMORY_DESCRIPTOR containing the 256 bytes centered around | 858 //! MINIDUMP_MEMORY_DESCRIPTOR containing the 256 bytes centered around |
849 //! the exception address or the instruction pointer. | 859 //! the exception address or the instruction pointer. |
850 MiniDumpNormal = 0x00000000, | 860 MiniDumpNormal = 0x00000000, |
851 }; | 861 }; |
852 | 862 |
853 #endif // CRASHPAD_COMPAT_NON_WIN_DBGHELP_H_ | 863 #endif // CRASHPAD_COMPAT_NON_WIN_DBGHELP_H_ |
OLD | NEW |