--- nono/debugger/debugger.h 2026/04/29 17:05:49 1.1.1.13 +++ nono/debugger/debugger.h 2026/04/29 17:05:58 1.1.1.14 @@ -72,6 +72,7 @@ class Debugger : public ThreadDevice struct { uint32 inst; // 命令ワード uint32 mask; // マスク + int instbytes; // 命令バイト数 }; }; @@ -108,8 +109,6 @@ class Debugger : public ThreadDevice void ExecMain() { Exec(md_mpu.get()); } void ExecXP() { Exec(md_xp.get()); } - void NotifyExceptionMain(int vector); - void NotifyExceptionXP(int vector); // MPU トレースが必要なら true を返す bool IsTrace() const; @@ -124,13 +123,14 @@ class Debugger : public ThreadDevice void AcceptCallback(uint32); void Input(int); void EnterPrompt(); + void QuitPrompt(); void LeavePrompt(bool trace); void PrintPrompt(); void Exec(DebuggerMD *); CmdAct Command(); bool CheckAllBreakpoints(DebuggerMD *); - bool CheckBreakpointInst(breakpoint_t&); + uint64 ReadBreakpointInst(breakpoint_t&); void ParseCmdbuf(); // コマンド名は大文字小文字を区別する関係でスネークスタイル。 CmdAct cmd_b(); @@ -158,6 +158,8 @@ class Debugger : public ThreadDevice CmdAct cmd_minus(); CmdAct cmd_n(); CmdAct cmd_nt(); + CmdAct cmd_pe(); + CmdAct cmd_pf(); CmdAct cmd_q(); CmdAct cmd_reset(); CmdAct cmd_s(); @@ -180,7 +182,6 @@ class Debugger : public ThreadDevice int AddBreakVector(const std::string& cpustr, const std::string& vecstr, const std::string& skipstr, std::string *errstr); int AddBreakpoint(const breakpoint_t&); - void RecalcInstMask(); bool GetAddr(busaddr *addr, bool); CmdAct cmd_d_common(busaddr access_mode); CmdAct cmd_hist_common(BranchHistory& hist); @@ -236,9 +237,6 @@ class Debugger : public ThreadDevice uint32 pc {}; std::array bpoint {}; - uint32 bi_inst {}; - int bi_inst_bytes {}; - int bi_need_bytes {}; uint64 ct_timespan {}; busaddr d_last_addr {}; busaddr m_last_addr {}; @@ -264,7 +262,7 @@ class Debugger : public ThreadDevice std::string bpointmsg {}; // ブレークポイントモニタ - DECLARE_MONITOR_CALLBACK(MonitorUpdateBpoint); + DECLARE_MONITOR_SCREEN(MonitorScreenBpoint); Monitor *bpoint_monitor {}; // 逆アセンブルとメモリダンプモニタ @@ -281,6 +279,6 @@ class Debugger : public ThreadDevice static std::vector cmdtable; }; -static inline Debugger *GetDebugger() { +inline Debugger *GetDebugger() { return Object::GetObject(OBJ_DEBUGGER); }