--- nono/debugger/debugger.cpp 2026/04/29 17:05:41 1.1.1.18 +++ nono/debugger/debugger.cpp 2026/04/29 17:05:45 1.1.1.19 @@ -92,7 +92,7 @@ Debugger::~Debugger() Close(); if ((bool)hostcom) { - hostcom->SetRxCallback(NULL); + hostcom->ResetRxCallback(); hostcom->SetAcceptCallback(NULL); } @@ -104,14 +104,14 @@ Debugger::Create() { // ホストドライバを作成 try { - hostcom.reset(new HostCOMDevice(this, "Debugger")); + hostcom.reset(new HostCOMDevice(this, -1, "Debugger")); } catch (...) { } if ((bool)hostcom == false) { warnx("Failed to initialize HostCOMDevice at %s", __method__); return false; } - hostcom->SetRxCallback(ToDeviceCallback(&Debugger::RxCallback)); + hostcom->SetRxCallback(ToDeviceCallback(&Debugger::RxCallback), 0); hostcom->SetAcceptCallback(ToDeviceCallback(&Debugger::AcceptCallback)); return true; @@ -421,7 +421,7 @@ Debugger::WriteFunc(const char *buf, int // ホストからの1文字受信通知 (HostCOM スレッドから呼ばれる) void -Debugger::RxCallback() +Debugger::RxCallback(uint32 arg) { // デバッガスレッドに通知 std::unique_lock lock(mtx); @@ -431,7 +431,7 @@ Debugger::RxCallback() // ホストからの着信通知 (HostCOM スレッドから呼ばれる) void -Debugger::AcceptCallback() +Debugger::AcceptCallback(uint32 dummy) { // デバッガスレッドに通知 std::unique_lock lock(mtx); @@ -2037,9 +2037,8 @@ Debugger::cmd_hist_common(BranchHistory& // MonitorUpdate() は TextScreen 高さに合わせて出力してくれる。 auto *histmon = hist.monitor; - auto size = histmon->GetSize(); TextScreen screen; - screen.Init(size.width, lines); + screen.Init(histmon->GetCol(), lines); // コンソールでは下が新しいの順のほうがいい if (bottom_to_top) {