--- nono/debugger/branchhistory.h 2026/04/29 17:05:41 1.1.1.9 +++ nono/debugger/branchhistory.h 2026/04/29 17:05:59 1.1.1.10 @@ -53,7 +53,7 @@ class BranchHistory : public Object const BranchEntry& AddEntry(uint32 from, uint32 to, uint32 info) { BranchEntry *e = &entry[top]; - if (e->from == from && e->to == to) { + if (e->from == from && e->to == to && e->info == info) { // 前回と同じなら通過回数++ e->count++; } else { @@ -83,7 +83,7 @@ class BranchHistory : public Object virtual std::string FormatHeader() const; virtual std::string FormatEntry(const BranchEntry& e) = 0; - DECLARE_MONITOR_CALLBACK(MonitorUpdate); + DECLARE_MONITOR_SCREEN(MonitorScreen); // 例外履歴かどうか。ヘッダ行が違う。 bool is_exhist {}; @@ -105,7 +105,8 @@ class BranchHistory_m680x0 : public Bran // info の分岐種別 static constexpr uint32 NORMAL = 0x00000000; // 通常分岐 static constexpr uint32 VECTORJUMP = 0x40000000; // ベクタによる分岐 - static constexpr uint32 SERVICECALL = 0x80000000; // IOCS/DOS コール + static constexpr uint32 SERVICECALL_HUMAN = 0x80000000; // IOCS/DOS call + static constexpr uint32 SERVICECALL_NETBSD = 0x80010000; // NetBSD syscall static constexpr uint32 EXCEPTION = 0xc0000000; // 例外発生 public: @@ -122,10 +123,13 @@ class BranchHistory_m680x0 : public Bran return EXCEPTION | vector; } static constexpr uint32 InfoIOCSCall(uint8 num) { - return SERVICECALL | num; + return SERVICECALL_HUMAN | num; } static constexpr uint32 InfoDOSCall(uint16 ir) { - return SERVICECALL | ir; + return SERVICECALL_HUMAN | ir; + } + static constexpr uint32 InfoNetBSDSyscall(uint16 syscall) { + return SERVICECALL_NETBSD | syscall; } std::string FormatEntry(const BranchEntry& e) override;