/** ****************************************************************************** * Xenia : Xbox 360 Emulator Research Project * ****************************************************************************** * Copyright 2014 Ben Vanik. All rights reserved. * * Released under the BSD license - see LICENSE in the root for more details. * ****************************************************************************** */ #ifndef XDB_POSTMORTEM_DEBUG_TARGET_H_ #define XDB_POSTMORTEM_DEBUG_TARGET_H_ // TODO(benvanik): abstract mapping type. #include #include #include #include #include namespace xdb { class PostmortemDebugTarget : public DebugTarget { public: PostmortemDebugTarget(); ~PostmortemDebugTarget() override; const uint8_t* trace_base() const { return trace_base_ + 8; } size_t trace_length() const { return trace_length_; } bool LoadTrace(const std::wstring& path, const std::wstring& content_path = L""); bool Prepare(); bool Prepare(std::atomic& cancelled); std::unique_ptr CreateCursor() override; private: HANDLE file_; HANDLE file_mapping_; const uint8_t* trace_base_; size_t trace_length_; const protocol::ProcessStartEvent* process_start_event_; const protocol::ProcessExitEvent* process_exit_event_; }; } // namespace xdb #endif // XDB_POSTMORTEM_DEBUG_TARGET_H_