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; | |
Mark Mentovai
2015/05/08 16:54:21
This is a size, so it’s more of an UnsignedIntegra
scottmg
2015/05/08 18:24:02
No, they're start/end pointers. Size is calculated
| |
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 template <class Traits> | |
299 struct CLIENT_ID { | |
300 typename Traits::Pointer UniqueProcess; | |
301 typename Traits::Pointer UniqueThread; | |
302 }; | |
303 | |
304 template <class Traits> | |
305 struct SYSTEM_EXTENDED_THREAD_INFORMATION{ | |
Mark Mentovai
2015/05/08 16:54:21
Put a space before the {.
Mark Mentovai
2015/05/08 16:54:21
I don’t see this in the SDK. If there’s a good ref
scottmg
2015/05/08 18:24:02
Done.
scottmg
2015/05/08 18:24:02
Done.
| |
306 LARGE_INTEGER KernelTime; | |
307 LARGE_INTEGER UserTime; | |
308 LARGE_INTEGER CreateTime; | |
309 union { | |
310 DWORD WaitTime; | |
311 typename Traits::Pad padding_for_x64_0; | |
312 }; | |
313 typename Traits::Pointer StartAddress; | |
314 CLIENT_ID<Traits> ClientId; | |
315 LONG Priority; | |
316 LONG BasePriority; | |
317 ULONG ContextSwitches; | |
318 ULONG ThreadState; | |
319 union { | |
320 ULONG WaitReason; | |
321 typename Traits::Pad padding_for_x64_1; | |
322 }; | |
323 typename Traits::Pointer StackBase; // These don't appear to be correct. | |
324 typename Traits::Pointer StackLimit; | |
Mark Mentovai
2015/05/08 16:54:20
This would be an UnsignedIntegral too.
scottmg
2015/05/08 18:24:02
See above.
| |
325 typename Traits::Pointer Win32StartAddress; | |
326 typename Traits::Pointer TebBase; | |
327 typename Traits::Pointer Reserved; | |
Mark Mentovai
2015/05/08 16:54:21
No suspend count hiding out in any of these?
scottmg
2015/05/08 18:24:02
They seem to be all 0 most of the time unfortunate
| |
328 typename Traits::Pointer Reserved2; | |
329 typename Traits::Pointer Reserved3; | |
330 }; | |
331 | |
332 // See http://undocumented.ntinternals.net/source/usermode/undocumented%20functi ons/system%20information/structures/system_process_information.html | |
333 template <class Traits> | |
334 struct SYSTEM_PROCESS_INFORMATION { | |
335 ULONG NextEntryOffset; | |
336 ULONG NumberOfThreads; | |
337 LARGE_INTEGER Reserved[3]; | |
Mark Mentovai
2015/05/08 16:54:21
Some of the ntexapi.h things I found explain the r
scottmg
2015/05/08 18:24:02
It seems like they were unused on older OSs, and h
| |
338 LARGE_INTEGER CreateTime; | |
339 LARGE_INTEGER UserTime; | |
340 LARGE_INTEGER KernelTime; | |
341 UNICODE_STRING<Traits> ImageName; | |
342 union { | |
343 LONG BasePriority; | |
344 typename Traits::Pad padding_for_x64_0; | |
345 }; | |
346 union { | |
347 DWORD UniqueProcessId; | |
348 typename Traits::Pad padding_for_x64_1; | |
349 }; | |
350 union { | |
351 DWORD InheritedFromUniqueProcessId; | |
352 typename Traits::Pad padding_for_x64_2; | |
353 }; | |
354 ULONG HandleCount; | |
355 ULONG Reserved2[3]; | |
356 SIZE_T PeakVirtualSize; | |
357 SIZE_T VirtualSize; | |
358 union { | |
359 ULONG PageFaultCount; | |
360 typename Traits::Pad padding_for_x64_3; | |
361 }; | |
362 SIZE_T PeakWorkingSetSize; | |
363 SIZE_T WorkingSetSize; | |
364 SIZE_T QuotaPeakPagedPoolUsage; | |
365 SIZE_T QuotaPagedPoolUsage; | |
366 SIZE_T QuotaPeakNonPagedPoolUsage; | |
367 SIZE_T QuotaNonPagedPoolUsage; | |
368 SIZE_T PagefileUsage; | |
369 SIZE_T PeakPagefileUsage; | |
370 SIZE_T PrivatePageCount; | |
371 LARGE_INTEGER ReadOperationCount; | |
372 LARGE_INTEGER WriteOperationCount; | |
373 LARGE_INTEGER OtherOperationCount; | |
374 LARGE_INTEGER ReadTransferCount; | |
375 LARGE_INTEGER WriteTransferCount; | |
376 LARGE_INTEGER OtherTransferCount; | |
377 SYSTEM_EXTENDED_THREAD_INFORMATION<Traits> Threads[1]; | |
378 }; | |
379 | |
284 #pragma pack(pop) | 380 #pragma pack(pop) |
285 | 381 |
286 //! \} | 382 //! \} |
287 | 383 |
288 } // namespace process_types | 384 } // namespace process_types |
289 } // namespace crashpad | 385 } // namespace crashpad |
290 | 386 |
291 #endif // CRASHPAD_UTIL_WIN_PROCESS_STRUCTS_H_ | 387 #endif // CRASHPAD_UTIL_WIN_PROCESS_STRUCTS_H_ |
OLD | NEW |