OLD | NEW |
1 /* Copyright (c) 2006, Google Inc. | 1 /* Copyright (c) 2006, Google Inc. |
2 * All rights reserved. | 2 * All rights reserved. |
3 * | 3 * |
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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 * the month member in the MDSystemTime structure is zero.*/ | 714 * the month member in the MDSystemTime structure is zero.*/ |
715 MDSystemTime daylight_date; | 715 MDSystemTime daylight_date; |
716 /* The bias value to be used during local time translations that occur during | 716 /* The bias value to be used during local time translations that occur during |
717 * daylight saving time. */ | 717 * daylight saving time. */ |
718 int32_t daylight_bias; | 718 int32_t daylight_bias; |
719 } MDTimeZoneInformation; /* TIME_ZONE_INFORMATION */ | 719 } MDTimeZoneInformation; /* TIME_ZONE_INFORMATION */ |
720 | 720 |
721 /* MAX_PATH from windef.h */ | 721 /* MAX_PATH from windef.h */ |
722 #define MD_MAX_PATH 260 | 722 #define MD_MAX_PATH 260 |
723 | 723 |
| 724 /* For MDXStateConfigFeatureMscInfo.features */ |
| 725 typedef struct { |
| 726 uint32_t offset; |
| 727 uint32_t size; |
| 728 } MDXStateFeature; |
| 729 |
| 730 /* For MDXStateConfigFeatureMscInfo.enabled_features from winnt.h */ |
| 731 typedef enum { |
| 732 MD_XSTATE_LEGACY_FLOATING_POINT = 0, /* XSTATE_LEGACY_FLOATING_POINT */ |
| 733 MD_XSTATE_LEGACY_SSE = 1, /* XSTATE_LEGACY_SSE */ |
| 734 MD_XSTATE_GSSE = 2, /* XSTATE_GSSE */ |
| 735 MD_XSTATE_AVX = MD_XSTATE_GSSE, /* XSTATE_AVX */ |
| 736 MD_XSTATE_MPX_BNDREGS = 3, /* XSTATE_MPX_BNDREGS */ |
| 737 MD_XSTATE_MPX_BNDCSR = 4, /* XSTATE_MPX_BNDCSR */ |
| 738 MD_XSTATE_AVX512_KMASK = 5, /* XSTATE_AVX512_KMASK */ |
| 739 MD_XSTATE_AVX512_ZMM_H = 6, /* XSTATE_AVX512_ZMM_H */ |
| 740 MD_XSTATE_AVX512_ZMM = 7, /* XSTATE_AVX512_ZMM */ |
| 741 MD_XSTATE_IPT = 8, /* XSTATE_IPT */ |
| 742 MD_XSTATE_LWP = 62 /* XSTATE_LWP */ |
| 743 } MDXStateFeatureFlag; |
| 744 |
| 745 /* MAXIMUM_XSTATE_FEATURES from winnt.h */ |
| 746 #define MD_MAXIMUM_XSTATE_FEATURES 64 |
| 747 |
| 748 /* For MDRawMiscInfo.xstate_data */ |
| 749 typedef struct { |
| 750 uint32_t size_of_info; |
| 751 uint32_t context_size; |
| 752 /* An entry in the features array is valid only if the corresponding bit in |
| 753 * the enabled_features flag is set. */ |
| 754 uint64_t enabled_features; |
| 755 MDXStateFeature features[MD_MAXIMUM_XSTATE_FEATURES]; |
| 756 } MDXStateConfigFeatureMscInfo; |
| 757 |
| 758 |
724 /* The miscellaneous information stream contains a variety | 759 /* The miscellaneous information stream contains a variety |
725 * of small pieces of information. A member is valid if | 760 * of small pieces of information. A member is valid if |
726 * it's within the available size and its corresponding | 761 * it's within the available size and its corresponding |
727 * bit is set. */ | 762 * bit is set. */ |
728 typedef struct { | 763 typedef struct { |
729 uint32_t size_of_info; /* Length of entire MDRawMiscInfo structure. */ | 764 uint32_t size_of_info; /* Length of entire MDRawMiscInfo structure. */ |
730 uint32_t flags1; | 765 uint32_t flags1; |
731 | 766 |
732 /* The next field is only valid if flags1 contains | 767 /* The next field is only valid if flags1 contains |
733 * MD_MISCINFO_FLAGS1_PROCESS_ID. */ | 768 * MD_MISCINFO_FLAGS1_PROCESS_ID. */ |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 | 809 |
775 /* The following fields are not present in MINIDUMP_MISC_INFO_3 but are | 810 /* The following fields are not present in MINIDUMP_MISC_INFO_3 but are |
776 * in MINIDUMP_MISC_INFO_4. When this struct is populated, these values | 811 * in MINIDUMP_MISC_INFO_4. When this struct is populated, these values |
777 * may not be set. Use flags1 and size_of_info to determine whether these | 812 * may not be set. Use flags1 and size_of_info to determine whether these |
778 * values are present. */ | 813 * values are present. */ |
779 | 814 |
780 /* The following 2 fields are only valid if flags1 contains | 815 /* The following 2 fields are only valid if flags1 contains |
781 * MD_MISCINFO_FLAGS1_BUILDSTRING. */ | 816 * MD_MISCINFO_FLAGS1_BUILDSTRING. */ |
782 uint16_t build_string[MD_MAX_PATH]; /* UTF-16-encoded, 0-terminated */ | 817 uint16_t build_string[MD_MAX_PATH]; /* UTF-16-encoded, 0-terminated */ |
783 uint16_t dbg_bld_str[40]; /* UTF-16-encoded, 0-terminated */ | 818 uint16_t dbg_bld_str[40]; /* UTF-16-encoded, 0-terminated */ |
| 819 |
| 820 /* The following fields are not present in MINIDUMP_MISC_INFO_4 but are |
| 821 * in MINIDUMP_MISC_INFO_5. When this struct is populated, these values |
| 822 * may not be set. Use flags1 and size_of_info to determine whether these |
| 823 * values are present. */ |
| 824 |
| 825 /* The following field has its own flags for establishing the validity of |
| 826 * the structure's contents.*/ |
| 827 MDXStateConfigFeatureMscInfo xstate_data; |
| 828 |
| 829 /* The following field is only valid if flags1 contains |
| 830 * MD_MISCINFO_FLAGS1_PROCESS_COOKIE. */ |
| 831 uint32_t process_cookie; |
784 } MDRawMiscInfo; /* MINIDUMP_MISC_INFO, MINIDUMP_MISC_INFO_2, | 832 } MDRawMiscInfo; /* MINIDUMP_MISC_INFO, MINIDUMP_MISC_INFO_2, |
785 * MINIDUMP_MISC_INFO_3, MINIDUMP_MISC_INFO_4, | 833 * MINIDUMP_MISC_INFO_3, MINIDUMP_MISC_INFO_4, |
786 * MINIDUMP_MISC_INFO_N */ | 834 * MINIDUMP_MISC_INFO_5, MINIDUMP_MISC_INFO_N */ |
787 | 835 |
788 static const size_t MD_MISCINFO_SIZE = | 836 static const size_t MD_MISCINFO_SIZE = |
789 offsetof(MDRawMiscInfo, processor_max_mhz); | 837 offsetof(MDRawMiscInfo, processor_max_mhz); |
790 static const size_t MD_MISCINFO2_SIZE = | 838 static const size_t MD_MISCINFO2_SIZE = |
791 offsetof(MDRawMiscInfo, process_integrity_level); | 839 offsetof(MDRawMiscInfo, process_integrity_level); |
792 static const size_t MD_MISCINFO3_SIZE = | 840 static const size_t MD_MISCINFO3_SIZE = |
793 offsetof(MDRawMiscInfo, build_string[0]); | 841 offsetof(MDRawMiscInfo, build_string[0]); |
794 static const size_t MD_MISCINFO4_SIZE = sizeof(MDRawMiscInfo); | 842 static const size_t MD_MISCINFO4_SIZE = |
| 843 offsetof(MDRawMiscInfo, xstate_data); |
| 844 /* Version 5 of the MDRawMiscInfo structure is not a multiple of 8 in size and |
| 845 * yet it contains some 8-bytes sized fields. This causes many compilers to |
| 846 * round the structure size up to a multiple of 8 by adding padding at the end. |
| 847 * The following hack is thus required for matching the proper on-disk size. */ |
| 848 static const size_t MD_MISCINFO5_SIZE = |
| 849 offsetof(MDRawMiscInfo, process_cookie) + sizeof(uint32_t); |
795 | 850 |
796 /* For (MDRawMiscInfo).flags1. These values indicate which fields in the | 851 /* For (MDRawMiscInfo).flags1. These values indicate which fields in the |
797 * MDRawMiscInfoStructure are valid. */ | 852 * MDRawMiscInfoStructure are valid. */ |
798 typedef enum { | 853 typedef enum { |
799 MD_MISCINFO_FLAGS1_PROCESS_ID = 0x00000001, | 854 MD_MISCINFO_FLAGS1_PROCESS_ID = 0x00000001, |
800 /* MINIDUMP_MISC1_PROCESS_ID */ | 855 /* MINIDUMP_MISC1_PROCESS_ID */ |
801 MD_MISCINFO_FLAGS1_PROCESS_TIMES = 0x00000002, | 856 MD_MISCINFO_FLAGS1_PROCESS_TIMES = 0x00000002, |
802 /* MINIDUMP_MISC1_PROCESS_TIMES */ | 857 /* MINIDUMP_MISC1_PROCESS_TIMES */ |
803 MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO = 0x00000004, | 858 MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO = 0x00000004, |
804 /* MINIDUMP_MISC1_PROCESSOR_POWER_INFO */ | 859 /* MINIDUMP_MISC1_PROCESSOR_POWER_INFO */ |
805 MD_MISCINFO_FLAGS1_PROCESS_INTEGRITY = 0x00000010, | 860 MD_MISCINFO_FLAGS1_PROCESS_INTEGRITY = 0x00000010, |
806 /* MINIDUMP_MISC3_PROCESS_INTEGRITY */ | 861 /* MINIDUMP_MISC3_PROCESS_INTEGRITY */ |
807 MD_MISCINFO_FLAGS1_PROCESS_EXECUTE_FLAGS = 0x00000020, | 862 MD_MISCINFO_FLAGS1_PROCESS_EXECUTE_FLAGS = 0x00000020, |
808 /* MINIDUMP_MISC3_PROCESS_EXECUTE_FLAGS */ | 863 /* MINIDUMP_MISC3_PROCESS_EXECUTE_FLAGS */ |
809 MD_MISCINFO_FLAGS1_TIMEZONE = 0x00000040, | 864 MD_MISCINFO_FLAGS1_TIMEZONE = 0x00000040, |
810 /* MINIDUMP_MISC3_TIMEZONE */ | 865 /* MINIDUMP_MISC3_TIMEZONE */ |
811 MD_MISCINFO_FLAGS1_PROTECTED_PROCESS = 0x00000080, | 866 MD_MISCINFO_FLAGS1_PROTECTED_PROCESS = 0x00000080, |
812 /* MINIDUMP_MISC3_PROTECTED_PROCESS */ | 867 /* MINIDUMP_MISC3_PROTECTED_PROCESS */ |
813 MD_MISCINFO_FLAGS1_BUILDSTRING = 0x00000100, | 868 MD_MISCINFO_FLAGS1_BUILDSTRING = 0x00000100, |
814 /* MINIDUMP_MISC4_BUILDSTRING */ | 869 /* MINIDUMP_MISC4_BUILDSTRING */ |
| 870 MD_MISCINFO_FLAGS1_PROCESS_COOKIE = 0x00000200, |
| 871 /* MINIDUMP_MISC5_PROCESS_COOKIE */ |
815 } MDMiscInfoFlags1; | 872 } MDMiscInfoFlags1; |
816 | 873 |
817 /* | 874 /* |
818 * Around DbgHelp version 6.0, the style of new LIST structures changed | 875 * Around DbgHelp version 6.0, the style of new LIST structures changed |
819 * from including an array of length 1 at the end of the struct to | 876 * from including an array of length 1 at the end of the struct to |
820 * represent the variable-length data to including explicit | 877 * represent the variable-length data to including explicit |
821 * "size of header", "size of entry" and "number of entries" fields | 878 * "size of header", "size of entry" and "number of entries" fields |
822 * in the header, presumably to allow backwards-compatibly-extending | 879 * in the header, presumably to allow backwards-compatibly-extending |
823 * the structures in the future. The actual list entries follow the | 880 * the structures in the future. The actual list entries follow the |
824 * header data directly in this case. | 881 * header data directly in this case. |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 uint64_t ldbase; | 1036 uint64_t ldbase; |
980 uint64_t dynamic; | 1037 uint64_t dynamic; |
981 } MDRawDebug64; | 1038 } MDRawDebug64; |
982 | 1039 |
983 #if defined(_MSC_VER) | 1040 #if defined(_MSC_VER) |
984 #pragma warning(pop) | 1041 #pragma warning(pop) |
985 #endif /* _MSC_VER */ | 1042 #endif /* _MSC_VER */ |
986 | 1043 |
987 | 1044 |
988 #endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ */ | 1045 #endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ */ |
OLD | NEW |