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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 typename Traits::Pointer SystemDefaultActivationContextData; | 274 typename Traits::Pointer SystemDefaultActivationContextData; |
275 typename Traits::Pointer SystemAssemblyStorageMap; | 275 typename Traits::Pointer SystemAssemblyStorageMap; |
276 typename Traits::UnsignedIntegral MinimumStackCommit; | 276 typename Traits::UnsignedIntegral MinimumStackCommit; |
277 typename Traits::Pointer FlsCallback; | 277 typename Traits::Pointer FlsCallback; |
278 LIST_ENTRY<Traits> FlsListHead; | 278 LIST_ENTRY<Traits> FlsListHead; |
279 typename Traits::Pointer FlsBitmap; | 279 typename Traits::Pointer FlsBitmap; |
280 DWORD FlsBitmapBits[4]; | 280 DWORD FlsBitmapBits[4]; |
281 DWORD FlsHighIndex; | 281 DWORD FlsHighIndex; |
282 }; | 282 }; |
283 | 283 |
| 284 template <class Traits> |
| 285 struct NT_TIB { |
| 286 typename Traits::Pointer ExceptionList; |
| 287 typename Traits::Pointer StackBase; |
| 288 typename Traits::Pointer StackLimit; |
| 289 typename Traits::Pointer SubSystemTib; |
| 290 union { |
| 291 typename Traits::Pointer FiberData; |
| 292 BYTE Version[4]; |
| 293 }; |
| 294 typename Traits::Pointer ArbitraryUserPointer; |
| 295 typename Traits::Pointer Self; |
| 296 }; |
| 297 |
| 298 // See https://msdn.microsoft.com/en-us/library/gg750647.aspx. |
| 299 template <class Traits> |
| 300 struct CLIENT_ID { |
| 301 typename Traits::Pointer UniqueProcess; |
| 302 typename Traits::Pointer UniqueThread; |
| 303 }; |
| 304 |
| 305 // See https://msdn.microsoft.com/en-us/library/gg750724.aspx for the base |
| 306 // structure, and |
| 307 // http://processhacker.sourceforge.net/doc/struct___s_y_s_t_e_m___e_x_t_e_n_d_e
_d___t_h_r_e_a_d___i_n_f_o_r_m_a_t_i_o_n.html |
| 308 // for the extension part. |
| 309 template <class Traits> |
| 310 struct SYSTEM_EXTENDED_THREAD_INFORMATION { |
| 311 LARGE_INTEGER KernelTime; |
| 312 LARGE_INTEGER UserTime; |
| 313 LARGE_INTEGER CreateTime; |
| 314 union { |
| 315 ULONG WaitTime; |
| 316 typename Traits::Pad padding_for_x64_0; |
| 317 }; |
| 318 typename Traits::Pointer StartAddress; |
| 319 CLIENT_ID<Traits> ClientId; |
| 320 LONG Priority; |
| 321 LONG BasePriority; |
| 322 ULONG ContextSwitches; |
| 323 ULONG ThreadState; |
| 324 union { |
| 325 ULONG WaitReason; |
| 326 typename Traits::Pad padding_for_x64_1; |
| 327 }; |
| 328 typename Traits::Pointer StackBase; // These don't appear to be correct. |
| 329 typename Traits::Pointer StackLimit; |
| 330 typename Traits::Pointer Win32StartAddress; |
| 331 typename Traits::Pointer TebBase; |
| 332 typename Traits::Pointer Reserved; |
| 333 typename Traits::Pointer Reserved2; |
| 334 typename Traits::Pointer Reserved3; |
| 335 }; |
| 336 |
| 337 // See http://undocumented.ntinternals.net/source/usermode/undocumented%20functi
ons/system%20information/structures/system_process_information.html |
| 338 template <class Traits> |
| 339 struct SYSTEM_PROCESS_INFORMATION { |
| 340 ULONG NextEntryOffset; |
| 341 ULONG NumberOfThreads; |
| 342 LARGE_INTEGER Reserved[3]; |
| 343 LARGE_INTEGER CreateTime; |
| 344 LARGE_INTEGER UserTime; |
| 345 LARGE_INTEGER KernelTime; |
| 346 UNICODE_STRING<Traits> ImageName; |
| 347 union { |
| 348 LONG BasePriority; |
| 349 typename Traits::Pad padding_for_x64_0; |
| 350 }; |
| 351 union { |
| 352 DWORD UniqueProcessId; |
| 353 typename Traits::Pad padding_for_x64_1; |
| 354 }; |
| 355 union { |
| 356 DWORD InheritedFromUniqueProcessId; |
| 357 typename Traits::Pad padding_for_x64_2; |
| 358 }; |
| 359 ULONG HandleCount; |
| 360 ULONG Reserved2[3]; |
| 361 SIZE_T PeakVirtualSize; |
| 362 SIZE_T VirtualSize; |
| 363 union { |
| 364 ULONG PageFaultCount; |
| 365 typename Traits::Pad padding_for_x64_3; |
| 366 }; |
| 367 SIZE_T PeakWorkingSetSize; |
| 368 SIZE_T WorkingSetSize; |
| 369 SIZE_T QuotaPeakPagedPoolUsage; |
| 370 SIZE_T QuotaPagedPoolUsage; |
| 371 SIZE_T QuotaPeakNonPagedPoolUsage; |
| 372 SIZE_T QuotaNonPagedPoolUsage; |
| 373 SIZE_T PagefileUsage; |
| 374 SIZE_T PeakPagefileUsage; |
| 375 SIZE_T PrivatePageCount; |
| 376 LARGE_INTEGER ReadOperationCount; |
| 377 LARGE_INTEGER WriteOperationCount; |
| 378 LARGE_INTEGER OtherOperationCount; |
| 379 LARGE_INTEGER ReadTransferCount; |
| 380 LARGE_INTEGER WriteTransferCount; |
| 381 LARGE_INTEGER OtherTransferCount; |
| 382 SYSTEM_EXTENDED_THREAD_INFORMATION<Traits> Threads[1]; |
| 383 }; |
| 384 |
284 #pragma pack(pop) | 385 #pragma pack(pop) |
285 | 386 |
286 //! \} | 387 //! \} |
287 | 388 |
288 } // namespace process_types | 389 } // namespace process_types |
289 } // namespace crashpad | 390 } // namespace crashpad |
290 | 391 |
291 #endif // CRASHPAD_UTIL_WIN_PROCESS_STRUCTS_H_ | 392 #endif // CRASHPAD_UTIL_WIN_PROCESS_STRUCTS_H_ |
OLD | NEW |