Postmortem debug target now loads/scans the trace and inits the filesystem.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user