--- nono/debugger/branchhistory.cpp 2026/04/29 17:05:20 1.1.1.8 +++ nono/debugger/branchhistory.cpp 2026/04/29 17:05:28 1.1.1.9 @@ -15,7 +15,7 @@ #include "vectortable.h" // コンストラクタ -BranchHistory::BranchHistory(int objid_) +BranchHistory::BranchHistory(uint objid_) : inherited(objid_) { int monitor_id; @@ -139,7 +139,7 @@ BranchHistory::MonitorUpdate(Monitor *, continue; } std::string str = FormatEntry(e); - screen.Print(0, y, "%3d %s", pos, str.c_str()); + screen.Print(0, y, "%3u %s", pos, str.c_str()); if (e.count > 1) { screen.Print(x_count, y, "x%9u", e.count); } @@ -209,7 +209,7 @@ BranchHistory::FormatHeader() const // // コンストラクタ -BranchHistory_m680x0::BranchHistory_m680x0(int objid_) +BranchHistory_m680x0::BranchHistory_m680x0(uint objid_) : inherited(objid_) { } @@ -273,9 +273,9 @@ BranchHistory_m680x0::FormatEntry(const uint num = e.inst & 0xff; const char *name = m680x0disasm::GetIOCSName(num); if (name != NULL) { - desc += string_format("<%3d> IOCS %s", M68K::EXCEP_TRAP15, name); + desc += string_format("<%3u> IOCS %s", M68K::EXCEP_TRAP15, name); } else { - desc += string_format("<%3d> IOCS $%02x", M68K::EXCEP_TRAP15, num); + desc += string_format("<%3u> IOCS $%02x", M68K::EXCEP_TRAP15, num); } break; } @@ -284,7 +284,7 @@ BranchHistory_m680x0::FormatEntry(const { uint32 vector = e.inst & 0xff; const char *name = vectortable->GetExceptionName(vector); - desc += string_format("<%3d> %s", vector, name ?: ""); + desc += string_format("<%3u> %s", vector, name ?: ""); break; } @@ -315,7 +315,7 @@ BranchHistory_m680x0::FormatEntry(const // 命令ワードとは衝突しない (instruction.txt 参照)。 // コンストラクタ -BranchHistory_m88xx0::BranchHistory_m88xx0(int objid_) +BranchHistory_m88xx0::BranchHistory_m88xx0(uint objid_) : inherited(objid_) { } @@ -338,11 +338,11 @@ BranchHistory_m88xx0::FormatEntry(const // 発生アドレスとベクタを表示 uint32 vector = e.inst & 0x1ff; const char *name = vectortable->GetExceptionName(vector); - desc += string_format("<%3d> %s", vector, name ?: ""); + desc += string_format("<%3u> %s", vector, name ?: ""); if (vector == 128 || vector == 450) { // 450 なら OpenBSD のシステムコール番号を追加。 // 非公式 NetBSD/luna88k は(今の所?) 128 を使ってるようだ。 - desc += string_format("(%d)", (e.inst >> 12) & 0xfff); + desc += string_format("(%u)", (e.inst >> 12) & 0xfff); } } else if (e.inst >= 0xc0000000) { // ブランチ @@ -428,7 +428,7 @@ BranchHistory_m88xx0::FormatEntry(const // inst が $ffffffff で区別する。 // コンストラクタ -BranchHistory_hd64180::BranchHistory_hd64180(int objid_) +BranchHistory_hd64180::BranchHistory_hd64180(uint objid_) : inherited(objid_) { monitor.SetSize(48, 1 + 32); // ヘッダ1行とエントリ数 @@ -473,7 +473,7 @@ BranchHistory_hd64180::FormatEntry(const } else if ((int32)e.inst < 0) { // 例外発生 uint32 vector = e.inst & 0xff; - desc += string_format("<%2d>%-15s", + desc += string_format("<%2u>%-15s", vector, MPU64180Device::InterruptName[vector]); // 例外履歴には宛先は出さないほうに統一。 // ブランチ履歴でも、ベクタ方式なら宛先不要。