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

Unified Diff: util/win/process_info.h

Issue 981393003: win: Support reading process info cross-bitness (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@64-port-test-2
Patch Set: rebase Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « util/util.gyp ('k') | util/win/process_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/win/process_info.h
diff --git a/util/win/process_info.h b/util/win/process_info.h
index 2c01668afe5402f6c01bd86f0379ef85c1064c62..91ddb4aed9cc5c1832bef6011c69093e168e6c35 100644
--- a/util/win/process_info.h
+++ b/util/win/process_info.h
@@ -15,10 +15,8 @@
#ifndef CRASHPAD_UTIL_WIN_PROCESS_INFO_H_
#define CRASHPAD_UTIL_WIN_PROCESS_INFO_H_
-#include <basetsd.h>
#include <sys/types.h>
#include <windows.h>
-#include <winternl.h>
#include <string>
#include <vector>
@@ -28,21 +26,6 @@
namespace crashpad {
-namespace internal {
-
-//! \brief This structure matches PROCESS_BASIC_INFORMATION in winternl.h but
-//! gives names to the Reserved fields (matching the WDK's ntddk.h).
-struct FULL_PROCESS_BASIC_INFORMATION {
- NTSTATUS ExitStatus;
- PPEB PebBaseAddress;
- KAFFINITY AffinityMask;
- PVOID BasePriority;
- ULONG_PTR UniqueProcessId;
- ULONG_PTR InheritedFromUniqueProcessId;
-};
-
-} // namespace internal
-
//! \brief Gathers information about a process given its `HANDLE`. This consists
//! primarily of information stored in the Process Environment Block.
class ProcessInfo {
@@ -84,7 +67,13 @@ class ProcessInfo {
bool Modules(std::vector<std::wstring>* modules) const;
private:
- internal::FULL_PROCESS_BASIC_INFORMATION process_basic_information_;
+ template <class T>
+ friend bool ReadProcessData(HANDLE process,
+ uintptr_t peb_address_uintptr,
+ ProcessInfo* process_info);
+
+ pid_t process_id_;
+ pid_t inherited_from_process_id_;
std::wstring command_line_;
std::vector<std::wstring> modules_;
bool is_64_bit_;
« no previous file with comments | « util/util.gyp ('k') | util/win/process_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698