OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 }; | 302 }; |
303 | 303 |
304 // See https://msdn.microsoft.com/en-us/library/gg750647.aspx. | 304 // See https://msdn.microsoft.com/en-us/library/gg750647.aspx. |
305 template <class Traits> | 305 template <class Traits> |
306 struct CLIENT_ID { | 306 struct CLIENT_ID { |
307 typename Traits::Pointer UniqueProcess; | 307 typename Traits::Pointer UniqueProcess; |
308 typename Traits::Pointer UniqueThread; | 308 typename Traits::Pointer UniqueThread; |
309 }; | 309 }; |
310 | 310 |
311 // This is a partial definition of the TEB, as we do not currently use many | 311 // This is a partial definition of the TEB, as we do not currently use many |
312 // fields of it. See http://www.nirsoft.net/kernel_struct/vista/TEB.html. | 312 // fields of it. See http://www.nirsoft.net/kernel_struct/vista/TEB.html, and |
| 313 // the (arch-specific) definition of _TEB in winternl.h. |
313 template <class Traits> | 314 template <class Traits> |
314 struct TEB { | 315 struct TEB { |
315 NT_TIB<Traits> NtTib; | 316 NT_TIB<Traits> NtTib; |
316 typename Traits::Pointer EnvironmentPointer; | 317 typename Traits::Pointer ProcessEnvironmentBlock; |
317 CLIENT_ID<Traits> ClientId; | 318 CLIENT_ID<Traits> ClientId; |
| 319 |
| 320 // Not identical to Reserved2 in winternl's _TEB because we define ClientId. |
| 321 typename Traits::Pointer RemainderOfReserved2[397]; |
| 322 |
| 323 BYTE Reserved3[1952]; |
| 324 typename Traits::Pointer TlsSlots[64]; |
| 325 BYTE Reserved4[8]; |
| 326 typename Traits::Pointer Reserved5[26]; |
| 327 typename Traits::Pointer ReservedForOle; |
| 328 typename Traits::Pointer Reserved6[4]; |
| 329 typename Traits::Pointer TlsExpansionSlots; |
318 }; | 330 }; |
319 | 331 |
320 // See https://msdn.microsoft.com/en-us/library/gg750724.aspx. | 332 // See https://msdn.microsoft.com/en-us/library/gg750724.aspx. |
321 template <class Traits> | 333 template <class Traits> |
322 struct SYSTEM_THREAD_INFORMATION { | 334 struct SYSTEM_THREAD_INFORMATION { |
323 union { | 335 union { |
324 struct { | 336 struct { |
325 LARGE_INTEGER KernelTime; | 337 LARGE_INTEGER KernelTime; |
326 LARGE_INTEGER UserTime; | 338 LARGE_INTEGER UserTime; |
327 LARGE_INTEGER CreateTime; | 339 LARGE_INTEGER CreateTime; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 using EXCEPTION_POINTERS64 = EXCEPTION_POINTERS<internal::Traits64>; | 455 using EXCEPTION_POINTERS64 = EXCEPTION_POINTERS<internal::Traits64>; |
444 | 456 |
445 #pragma pack(pop) | 457 #pragma pack(pop) |
446 | 458 |
447 //! \} | 459 //! \} |
448 | 460 |
449 } // namespace process_types | 461 } // namespace process_types |
450 } // namespace crashpad | 462 } // namespace crashpad |
451 | 463 |
452 #endif // CRASHPAD_UTIL_WIN_PROCESS_STRUCTS_H_ | 464 #endif // CRASHPAD_UTIL_WIN_PROCESS_STRUCTS_H_ |
OLD | NEW |