--- nono/debugger/debugger.cpp 2026/04/29 17:05:32 1.1.1.17 +++ nono/debugger/debugger.cpp 2026/04/29 17:05:41 1.1.1.18 @@ -103,8 +103,11 @@ bool Debugger::Create() { // ホストドライバを作成 - hostcom.reset(new HostCOMDevice(this, "Debugger")); + try { + hostcom.reset(new HostCOMDevice(this, "Debugger")); + } catch (...) { } if ((bool)hostcom == false) { + warnx("Failed to initialize HostCOMDevice at %s", __method__); return false; } @@ -136,14 +139,28 @@ Debugger::Init() syncer = GetSyncer(); - if (gMainApp.Has(VMCap::M88K)) { - md_mpu.reset(new DebuggerMD_m88xx0(this)); - } else { - md_mpu.reset(new DebuggerMD_m680x0(this)); + try { + if (gMainApp.Has(VMCap::M88K)) { + md_mpu.reset(new DebuggerMD_m88xx0(this)); + } else { + md_mpu.reset(new DebuggerMD_m680x0(this)); + } + } catch (...) { } + if ((bool)md_mpu == false) { + warnx("Failed to initialize md_mpu at %s", __method__); + return false; } + if (gMainApp.Has(VMCap::LUNA)) { - md_xp.reset(new DebuggerMD_hd64180(this)); + try { + md_xp.reset(new DebuggerMD_hd64180(this)); + } catch (...) { } + if ((bool)md_xp == false) { + warnx("Failed to initialize md_xp at %s", __method__); + return false; + } } + // とりあえずメインプロセッサに固定 curmd = md_mpu.get();