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_ |