diff --git a/src/xenia/cpu/debug_info.cc b/src/xenia/cpu/debug_info.cc index ab99e880b..867f1edc8 100644 --- a/src/xenia/cpu/debug_info.cc +++ b/src/xenia/cpu/debug_info.cc @@ -68,7 +68,7 @@ SourceMapEntry* DebugInfo::LookupCodeOffset(uint32_t offset) { return entry; } } - return nullptr; + return source_map_count_ ? &source_map_entries_[0] : nullptr; } void DebugInfo::Dump() { diff --git a/src/xenia/debug/server/xdp/xdp_server.cc b/src/xenia/debug/server/xdp/xdp_server.cc index 3a2985af7..f499fa110 100644 --- a/src/xenia/debug/server/xdp/xdp_server.cc +++ b/src/xenia/debug/server/xdp/xdp_server.cc @@ -84,8 +84,7 @@ void XdpServer::AcceptClient(std::unique_ptr client) { // Create a thread to manage the connection. client_thread_ = xe::threading::Thread::Create({}, [this]() { - // TODO(benvanik): GDB protocol stuff? Do we say hi? - // TODO(benvanik): move hello to thread + xe::threading::set_name("XDP Debug Server"); // Let the debugger know we are present. debugger_->set_attached(true); diff --git a/src/xenia/kernel/objects/xuser_module.cc b/src/xenia/kernel/objects/xuser_module.cc index 8bef4c77e..c803ef0ce 100644 --- a/src/xenia/kernel/objects/xuser_module.cc +++ b/src/xenia/kernel/objects/xuser_module.cc @@ -223,6 +223,12 @@ X_STATUS XUserModule::Launch(uint32_t flags) { entry_point_, 0, X_CREATE_SUSPENDED, true)); + // We know this is the 'main thread'. + char thread_name[32]; + snprintf(thread_name, xe::countof(thread_name), "Main XThread %04X", + thread->handle()); + thread->set_name(thread_name); + X_STATUS result = thread->Create(); if (XFAILED(result)) { XELOGE("Could not create launch thread: %.8X", result);