Skeleton of the debugger host.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
using namespace xe;
|
||||
using namespace xe::cpu;
|
||||
using namespace xe::dbg;
|
||||
using namespace xe::kernel;
|
||||
|
||||
|
||||
@@ -34,6 +35,7 @@ private:
|
||||
xe_memory_ref memory_;
|
||||
shared_ptr<Processor> processor_;
|
||||
shared_ptr<Runtime> runtime_;
|
||||
shared_ptr<Debugger> debugger_;
|
||||
};
|
||||
|
||||
Run::Run() {
|
||||
@@ -50,6 +52,8 @@ int Run::Setup() {
|
||||
pal_ = xe_pal_create(pal_options);
|
||||
XEEXPECTNOTNULL(pal_);
|
||||
|
||||
debugger_ = shared_ptr<Debugger>(new Debugger(pal_));
|
||||
|
||||
xe_memory_options_t memory_options;
|
||||
xe_zero_struct(&memory_options, sizeof(memory_options));
|
||||
memory_ = xe_memory_create(pal_, memory_options);
|
||||
@@ -86,6 +90,13 @@ int Run::Launch(const xechar_t* path) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Run the debugger.
|
||||
// This may pause waiting for connections.
|
||||
if (debugger_->Startup()) {
|
||||
XELOGE(XT("Debugger failed to startup"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Launch based on file type.
|
||||
// This is a silly guess based on file extension.
|
||||
// NOTE: the runtime launch routine will wait until the module exits.
|
||||
|
||||
Reference in New Issue
Block a user