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

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

Issue 1360863006: win: Add more memory regions to gathering of PEB (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@save-peb
Patch Set: rebase Created 5 years, 2 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
« no previous file with comments | « no previous file | snapshot/win/process_reader_win.cc » ('j') | snapshot/win/process_reader_win.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 //! \return `true` on success, indicating that this object will respond 76 //! \return `true` on success, indicating that this object will respond
77 //! validly to further method calls. `false` on failure. On failure, no 77 //! validly to further method calls. `false` on failure. On failure, no
78 //! further method calls should be made. 78 //! further method calls should be made.
79 //! 79 //!
80 //! \sa ScopedProcessSuspend 80 //! \sa ScopedProcessSuspend
81 bool Initialize(HANDLE process, ProcessSuspensionState suspension_state); 81 bool Initialize(HANDLE process, ProcessSuspensionState suspension_state);
82 82
83 //! \return `true` if the target task is a 64-bit process. 83 //! \return `true` if the target task is a 64-bit process.
84 bool Is64Bit() const { return process_info_.Is64Bit(); } 84 bool Is64Bit() const { return process_info_.Is64Bit(); }
85 85
86 //! \brief Attempts to read \a num_bytes bytes from the target process
87 //! starting at address \a at into \a into.
88 //!
89 //! \return `true` if the entire region could be read, or `false` with an
90 //! error logged.
91 //!
92 //! \sa ReadAvailableMemory
86 bool ReadMemory(WinVMAddress at, WinVMSize num_bytes, void* into) const; 93 bool ReadMemory(WinVMAddress at, WinVMSize num_bytes, void* into) const;
87 94
95 //! \brief Attempts to read \a num_bytes bytes from the target process
96 //! starting at address \a at into \a into. If some of the specified range
97 //! is not accessible, reads up to the first inaccessible byte.
98 //!
99 //! \return The actual number of bytes read.
100 //!
101 //! \sa ReadMemory
102 WinVMSize ReadAvailableMemory(WinVMAddress at,
103 WinVMSize num_bytes,
104 void* into) const;
105
88 //! \brief Determines the target process' start time. 106 //! \brief Determines the target process' start time.
89 //! 107 //!
90 //! \param[out] start_time The time that the process started. 108 //! \param[out] start_time The time that the process started.
91 //! 109 //!
92 //! \return `true` on success, `false` on failure, with a warning logged. 110 //! \return `true` on success, `false` on failure, with a warning logged.
93 bool StartTime(timeval* start_time) const; 111 bool StartTime(timeval* start_time) const;
94 112
95 //! \brief Determines the target process' execution time. 113 //! \brief Determines the target process' execution time.
96 //! 114 //!
97 //! \param[out] user_time The amount of time the process has executed code in 115 //! \param[out] user_time The amount of time the process has executed code in
(...skipping 26 matching lines...) Expand all
124 ProcessSuspensionState suspension_state_; 142 ProcessSuspensionState suspension_state_;
125 bool initialized_threads_; 143 bool initialized_threads_;
126 InitializationStateDcheck initialized_; 144 InitializationStateDcheck initialized_;
127 145
128 DISALLOW_COPY_AND_ASSIGN(ProcessReaderWin); 146 DISALLOW_COPY_AND_ASSIGN(ProcessReaderWin);
129 }; 147 };
130 148
131 } // namespace crashpad 149 } // namespace crashpad
132 150
133 #endif // CRASHPAD_SNAPSHOT_WIN_PROCESS_READER_WIN_H_ 151 #endif // CRASHPAD_SNAPSHOT_WIN_PROCESS_READER_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | snapshot/win/process_reader_win.cc » ('j') | snapshot/win/process_reader_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698