Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Side by Side Diff: third_party/crashpad/crashpad/minidump/minidump_context.h

Issue 2705373005: Revert of Update Crashpad to 6da9708e7cc93e2e1772439d51646e47583cb225 (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 //! \brief Indicates the validity of non-control segment registers 86 //! \brief Indicates the validity of non-control segment registers
87 //! (`CONTEXT_SEGMENTS`). 87 //! (`CONTEXT_SEGMENTS`).
88 //! 88 //!
89 //! The `gs`, `fs`, `es`, and `ds` fields are valid. 89 //! The `gs`, `fs`, `es`, and `ds` fields are valid.
90 kMinidumpContextX86Segment = kMinidumpContextX86 | 0x00000004, 90 kMinidumpContextX86Segment = kMinidumpContextX86 | 0x00000004,
91 91
92 //! \brief Indicates the validity of floating-point state 92 //! \brief Indicates the validity of floating-point state
93 //! (`CONTEXT_FLOATING_POINT`). 93 //! (`CONTEXT_FLOATING_POINT`).
94 //! 94 //!
95 //! The `fsave` field is valid. The `float_save` field is included in this 95 //! The `float_save` field is valid.
96 //! definition, but its members have no practical use asdie from `fsave`.
97 kMinidumpContextX86FloatingPoint = kMinidumpContextX86 | 0x00000008, 96 kMinidumpContextX86FloatingPoint = kMinidumpContextX86 | 0x00000008,
98 97
99 //! \brief Indicates the validity of debug registers 98 //! \brief Indicates the validity of debug registers
100 //! (`CONTEXT_DEBUG_REGISTERS`). 99 //! (`CONTEXT_DEBUG_REGISTERS`).
101 //! 100 //!
102 //! The `dr0` through `dr3`, `dr6`, and `dr7` fields are valid. 101 //! The `dr0` through `dr3`, `dr6`, and `dr7` fields are valid.
103 kMinidumpContextX86Debug = kMinidumpContextX86 | 0x00000010, 102 kMinidumpContextX86Debug = kMinidumpContextX86 | 0x00000010,
104 103
105 //! \brief Indicates the validity of extended registers in `fxsave` format 104 //! \brief Indicates the validity of extended registers in `fxsave` format
106 //! (`CONTEXT_EXTENDED_REGISTERS`). 105 //! (`CONTEXT_EXTENDED_REGISTERS`).
(...skipping 17 matching lines...) Expand all
124 //! (`CONTEXT_ALL`). 123 //! (`CONTEXT_ALL`).
125 kMinidumpContextX86All = kMinidumpContextX86Full | 124 kMinidumpContextX86All = kMinidumpContextX86Full |
126 kMinidumpContextX86FloatingPoint | 125 kMinidumpContextX86FloatingPoint |
127 kMinidumpContextX86Debug | 126 kMinidumpContextX86Debug |
128 kMinidumpContextX86Extended, 127 kMinidumpContextX86Extended,
129 }; 128 };
130 129
131 //! \brief A 32-bit x86 CPU context (register state) carried in a minidump file. 130 //! \brief A 32-bit x86 CPU context (register state) carried in a minidump file.
132 //! 131 //!
133 //! This is analogous to the `CONTEXT` structure on Windows when targeting 132 //! This is analogous to the `CONTEXT` structure on Windows when targeting
134 //! 32-bit x86, and the `WOW64_CONTEXT` structure when targeting an x86-family 133 //! 32-bit x86. This structure is used instead of `CONTEXT` to make it available
135 //! CPU, either 32- or 64-bit. This structure is used instead of `CONTEXT` or 134 //! when targeting other architectures.
136 //! `WOW64_CONTEXT` to make it available when targeting other architectures.
137 //! 135 //!
138 //! \note This structure doesn’t carry `dr4` or `dr5`, which are obsolete and 136 //! \note This structure doesn’t carry `dr4` or `dr5`, which are obsolete and
139 //! normally alias `dr6` and `dr7`, respectively. See Intel Software 137 //! normally alias `dr6` and `dr7`, respectively. See Intel Software
140 //! Developer’s Manual, Volume 3B: System Programming, Part 2 (253669-052), 138 //! Developer’s Manual, Volume 3B: System Programming, Part 2 (253669-052),
141 //! 17.2.2 “Debug Registers DR4 and DR5”. 139 //! 17.2.2 “Debug Registers DR4 and DR5”.
142 struct MinidumpContextX86 { 140 struct MinidumpContextX86 {
143 //! \brief A bitfield composed of values of #MinidumpContextFlags and 141 //! \brief A bitfield composed of values of #MinidumpContextFlags and
144 //! #MinidumpContextX86Flags. 142 //! #MinidumpContextX86Flags.
145 //! 143 //!
146 //! This field identifies the context structure as a 32-bit x86 CPU context, 144 //! This field identifies the context structure as a 32-bit x86 CPU context,
147 //! and indicates which other fields in the structure are valid. 145 //! and indicates which other fields in the structure are valid.
148 uint32_t context_flags; 146 uint32_t context_flags;
149 147
150 uint32_t dr0; 148 uint32_t dr0;
151 uint32_t dr1; 149 uint32_t dr1;
152 uint32_t dr2; 150 uint32_t dr2;
153 uint32_t dr3; 151 uint32_t dr3;
154 uint32_t dr6; 152 uint32_t dr6;
155 uint32_t dr7; 153 uint32_t dr7;
156 154
157 // CPUContextX86::Fsave has identical layout to what the x86 CONTEXT 155 struct {
158 // structure places here. 156 uint32_t control_word;
159 CPUContextX86::Fsave fsave; 157 uint32_t status_word;
160 union { 158 uint32_t tag_word;
161 uint32_t spare_0; // As in the native x86 CONTEXT structure since Windows 8 159 uint32_t error_offset;
162 uint32_t cr0_npx_state; // As in WOW64_CONTEXT and older SDKs’ x86 CONTEXT 160 uint32_t error_selector;
161 uint32_t data_offset;
162 uint32_t data_selector;
163 uint8_t register_area[80];
164 uint32_t spare_0;
163 } float_save; 165 } float_save;
164 166
165 uint32_t gs; 167 uint32_t gs;
166 uint32_t fs; 168 uint32_t fs;
167 uint32_t es; 169 uint32_t es;
168 uint32_t ds; 170 uint32_t ds;
169 171
170 uint32_t edi; 172 uint32_t edi;
171 uint32_t esi; 173 uint32_t esi;
172 uint32_t ebx; 174 uint32_t ebx;
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 uint64_t last_branch_to_rip; 335 uint64_t last_branch_to_rip;
334 uint64_t last_branch_from_rip; 336 uint64_t last_branch_from_rip;
335 uint64_t last_exception_to_rip; 337 uint64_t last_exception_to_rip;
336 uint64_t last_exception_from_rip; 338 uint64_t last_exception_from_rip;
337 //! \} 339 //! \}
338 }; 340 };
339 341
340 } // namespace crashpad 342 } // namespace crashpad
341 343
342 #endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_ 344 #endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698