Postmortem debug target now loads/scans the trace and inits the filesystem.

This commit is contained in:
Ben Vanik
2014-08-15 10:19:59 -07:00
parent 4768f2fc0b
commit 3de39aaf10
27 changed files with 541 additions and 255 deletions

View File

@@ -10,22 +10,34 @@
#ifndef XDB_POSTMORTEM_DEBUG_TARGET_H_
#define XDB_POSTMORTEM_DEBUG_TARGET_H_
// TODO(benvanik): abstract mapping type.
#include <Windows.h>
#include <atomic>
#include <string>
#include <xdb/debug_target.h>
#include <xdb/protocol.h>
namespace xdb {
class PostmortemDebugTarget : public DebugTarget {
public:
PostmortemDebugTarget() = default;
PostmortemDebugTarget();
~PostmortemDebugTarget() override;
bool LoadTrace(const std::wstring& path);
bool LoadContent(const std::wstring& path = L"");
bool LoadTrace(const std::wstring& path,
const std::wstring& content_path = L"");
bool Prepare();
bool Prepare(std::atomic<bool>& cancelled);
private:
HANDLE file_;
HANDLE file_mapping_;
const uint8_t* trace_base_;
const protocol::ProcessStartEvent* process_start_event_;
const protocol::ProcessExitEvent* process_exit_event_;
};
} // namespace xdb