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

@@ -17,24 +17,17 @@ using namespace xe;
using namespace xe::kernel;
using namespace xe::kernel::fs;
STFSContainerDevice::STFSContainerDevice(
const char* path, const xechar_t* local_path) :
Device(path) {
local_path_ = xestrdup(local_path);
mmap_ = NULL;
stfs_ = NULL;
}
STFSContainerDevice::STFSContainerDevice(const std::string& path,
const std::wstring& local_path)
: Device(path), local_path_(local_path), mmap_(nullptr), stfs_(nullptr) {}
STFSContainerDevice::~STFSContainerDevice() {
delete stfs_;
xe_mmap_release(mmap_);
xe_free(local_path_);
}
int STFSContainerDevice::Init() {
mmap_ = xe_mmap_open(kXEFileModeRead, local_path_, 0, 0);
mmap_ = xe_mmap_open(kXEFileModeRead, local_path_.c_str(), 0, 0);
if (!mmap_) {
XELOGE("STFS container could not be mapped");
return 1;