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

Unified Diff: snapshot/win/memory_map_region_snapshot_win.cc

Issue 1377133006: Mostly-boilerplate to add MemoryMapSnapshot (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@memory-info-to-misc
Patch Set: fixes 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « snapshot/win/memory_map_region_snapshot_win.h ('k') | snapshot/win/process_snapshot_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/win/memory_map_region_snapshot_win.cc
diff --git a/snapshot/minidump/minidump_string_reader.h b/snapshot/win/memory_map_region_snapshot_win.cc
similarity index 51%
copy from snapshot/minidump/minidump_string_reader.h
copy to snapshot/win/memory_map_region_snapshot_win.cc
index e5667ec242bc8f53d570179f4eddfeb2f8cb90f7..c64254c680b015b9ce12a1a1524aad991c48b9f0 100644
--- a/snapshot/minidump/minidump_string_reader.h
+++ b/snapshot/win/memory_map_region_snapshot_win.cc
@@ -12,29 +12,30 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef CRASHPAD_SNAPSHOT_MINIDUMP_MINIDUMP_STRING_READER_H_
-#define CRASHPAD_SNAPSHOT_MINIDUMP_MINIDUMP_STRING_READER_H_
-
-#include <windows.h>
-#include <dbghelp.h>
-
-#include <string>
-
-#include "util/file/file_reader.h"
+#include "snapshot/win/memory_map_region_snapshot_win.h"
namespace crashpad {
namespace internal {
-//! \brief Reads a MinidumpUTF8String from a minidump file at offset \a rva in
-//! \a file_reader, and returns it in \a string.
-//!
-//! \return `true` on success, with \a string set. `false` on failure, with a
-//! message logged.
-bool ReadMinidumpUTF8String(FileReaderInterface* file_reader,
- RVA rva,
- std::string* string);
+MemoryMapRegionSnapshotWin::MemoryMapRegionSnapshotWin(
+ const MEMORY_BASIC_INFORMATION64& mbi)
+ : memory_info_() {
+ memory_info_.BaseAddress = mbi.BaseAddress;
+ memory_info_.AllocationBase = mbi.AllocationBase;
+ memory_info_.AllocationProtect = mbi.AllocationProtect;
+ memory_info_.RegionSize = mbi.RegionSize;
+ memory_info_.State = mbi.State;
+ memory_info_.Protect = mbi.Protect;
+ memory_info_.Type = mbi.Type;
+}
+
+MemoryMapRegionSnapshotWin::~MemoryMapRegionSnapshotWin() {
+}
+
+const MINIDUMP_MEMORY_INFO& MemoryMapRegionSnapshotWin::AsMinidumpMemoryInfo()
+ const {
+ return memory_info_;
+}
} // namespace internal
} // namespace crashpad
-
-#endif // CRASHPAD_SNAPSHOT_MINIDUMP_MINIDUMP_STRING_READER_H_
« no previous file with comments | « snapshot/win/memory_map_region_snapshot_win.h ('k') | snapshot/win/process_snapshot_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698