GET /sessions returns the title info.

This commit is contained in:
Ben Vanik
2013-12-20 23:44:22 -08:00
parent 1461792289
commit 8a7bd7b69a
11 changed files with 101 additions and 7 deletions

View File

@@ -132,9 +132,6 @@ X_STATUS XModule::Launch(uint32_t flags) {
XELOGI("Launching module...");
// Set as the main module, while running.
kernel_state()->SetExecutableModule(this);
Dump();
// Create a thread to run in.
@@ -154,7 +151,6 @@ X_STATUS XModule::Launch(uint32_t flags) {
// Wait until thread completes.
thread->Wait(0, 0, 0, NULL);
kernel_state()->SetExecutableModule(NULL);
thread->Release();
return X_STATUS_SUCCESS;

View File

@@ -11,7 +11,9 @@
#include <gflags/gflags.h>
#include <xenia/emulator.h>
#include <xenia/export_resolver.h>
#include <xenia/debug/debug_server.h>
#include <xenia/kernel/xboxkrnl/kernel_state.h>
#include <xenia/kernel/xboxkrnl/xboxkrnl_private.h>
#include <xenia/kernel/xboxkrnl/objects/xmodule.h>
@@ -166,15 +168,25 @@ int XboxkrnlModule::LaunchModule(const char* path) {
return 1;
}
// Set as the main module, while running.
kernel_state_->SetExecutableModule(module);
if (FLAGS_abort_before_entry) {
XELOGI("--abort_before_entry causing an early exit");
module->Release();
return 0;
}
// Spin up the debugger and let it know we are starting.
if (emulator_->debug_server()->BeforeEntry()) {
XELOGE("Debugger failed to startup.");
return 2;
}
// Launch the module.
// NOTE: this won't return until the module exits.
result_code = module->Launch(0);
kernel_state_->SetExecutableModule(NULL);
if (XFAILED(result_code)) {
XELOGE("Failed to launch module %s: %.8X", path, result_code);
module->Release();

View File

@@ -39,6 +39,8 @@ public:
XboxkrnlModule(Emulator* emulator);
virtual ~XboxkrnlModule();
KernelState* kernel_state() const { return kernel_state_; }
int LaunchModule(const char* path);
private: