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

Side by Side Diff: snapshot/win/process_reader_win.h

Issue 1052813002: win: make CrashpadInfo retrievable (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fix mac includes Created 5 years, 8 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 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 24 matching lines...) Expand all
35 //! PROCESS_VM_READ, and PROCESS_DUP_HANDLE access. 35 //! PROCESS_VM_READ, and PROCESS_DUP_HANDLE access.
36 //! 36 //!
37 //! \return `true` on success, indicating that this object will respond 37 //! \return `true` on success, indicating that this object will respond
38 //! validly to further method calls. `false` on failure. On failure, no 38 //! validly to further method calls. `false` on failure. On failure, no
39 //! further method calls should be made. 39 //! further method calls should be made.
40 bool Initialize(HANDLE process); 40 bool Initialize(HANDLE process);
41 41
42 //! \return `true` if the target task is a 64-bit process. 42 //! \return `true` if the target task is a 64-bit process.
43 bool Is64Bit() const { return process_info_.Is64Bit(); } 43 bool Is64Bit() const { return process_info_.Is64Bit(); }
44 44
45 pid_t ProcessID() const { return process_info_.ProcessID(); }
46 pid_t ParentProcessID() const { return process_info_.ParentProcessID(); }
47
48 bool ReadMemory(uintptr_t at, size_t num_bytes, void* into);
49
50 //! \return The modules loaded in the process. The first element (at index
51 //! `0`) corresponds to the main executable.
52 const std::vector<ProcessInfo::Module>& Modules();
53
45 private: 54 private:
55 HANDLE process_;
46 ProcessInfo process_info_; 56 ProcessInfo process_info_;
57 std::vector<ProcessInfo::Module> modules_;
47 InitializationStateDcheck initialized_; 58 InitializationStateDcheck initialized_;
48 59
49 DISALLOW_COPY_AND_ASSIGN(ProcessReaderWin); 60 DISALLOW_COPY_AND_ASSIGN(ProcessReaderWin);
50 }; 61 };
51 62
52 } // namespace crashpad 63 } // namespace crashpad
53 64
54 #endif // CRASHPAD_SNAPSHOT_WIN_PROCESS_READER_WIN_H_ 65 #endif // CRASHPAD_SNAPSHOT_WIN_PROCESS_READER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698