--- nono/debugger/debugger_m680x0.h 2026/04/29 17:05:32 1.1.1.10 +++ nono/debugger/debugger_m680x0.h 2026/04/29 17:05:58 1.1.1.12 @@ -14,6 +14,8 @@ #include "mpu680x0.h" #include "m680x0disasm.h" +class StackData; + class DebuggerMD_m680x0 : public DebuggerMD { using inherited = DebuggerMD; @@ -27,6 +29,9 @@ class DebuggerMD_m680x0 : public Debugge busaddr TranslateAddr(busaddr laddr) const override; uint32 GetPC() const override { return cpu->reg.pc; } + int32 GetAndResetLastVector() override { + return cpu->GetAndResetLastVector(); + } void SetStepOut() override; bool IsStepOut() const override; @@ -40,6 +45,12 @@ class DebuggerMD_m680x0 : public Debugge bool CheckLEA(uint32 laddr) override { return false; } std::string Disassemble(DebuggerMemoryStream& mem) override; + std::string ParseInst(const std::string&) const override; + + void PrintExceptionFrame(FILE *, busaddr) override; + + // 浮動小数点ステートフレームを表示する。 + void PrintFPStateFrame(FILE *, busaddr); private: MPU680x0Device *cpu {}; // MPU デバイス @@ -60,6 +71,19 @@ class DebuggerMD_m680x0 : public Debugge void ShowRegATC(); void ShowRegOther(); + bool PrintExceptionFrameCommon(FILE *, const StackData&, bool); + void PrintExceptionFrame0(FILE *, StackData&); + void PrintExceptionFrame2(FILE *, StackData&); + void PrintExceptionFrame3(FILE *, StackData&); + void PrintExceptionFrame4(FILE *, StackData&); + void PrintExceptionFrame7(FILE *, StackData&); + void PrintExceptionFrameB(FILE *, StackData&); + + void PrintFPFrame6888xIdle(FILE *, StackData&, uint32 len); + void PrintFPFrame6888xBusy(FILE *, StackData&, uint32 len); + void PrintFPFrame68040Unimpl(FILE *, StackData&, uint base); + void PrintFPFrame68040Busy(FILE *, StackData&); + uint32 so_a7 {}; // ステップアウト判定用 uint16 so_sr {}; };