Annotation of nono/debugger/debugger_m680x0.h, revision 1.1.1.4

1.1       root        1: //
                      2: // nono
1.1.1.2   root        3: // Copyright (C) 2020 nono project
                      4: // Licensed under nono-license.txt
1.1       root        5: //
                      6: 
                      7: #pragma once
                      8: 
                      9: #include "debugger_private.h"
1.1.1.2   root       10: #include "mpu680x0.h"
1.1       root       11: #include "m68030.h"
                     12: #include "m68030disasm.h"
                     13: 
                     14: class DebuggerMD_m680x0 : public DebuggerMD
                     15: {
1.1.1.2   root       16:        using inherited = DebuggerMD;
1.1       root       17:  public:
1.1.1.2   root       18:        DebuggerMD_m680x0(Debugger *parent, m68kcpu *cpu);
                     19:        ~DebuggerMD_m680x0() override;
                     20: 
                     21:        void ReqSet(uint32 flag) override { cpu->atomic_reqflag |= flag; }
                     22:        void ReqClr(uint32 flag) override { cpu->atomic_reqflag &= ~flag; }
                     23: 
                     24:        bool IsSuper() const override { return cpu->reg.s; }
                     25:        bool MMUEnabled() const override { return cpu->mmu_enable; }
                     26:        uint64 TranslateAddr(saddr_t laddr) override;
                     27: 
                     28:        uint32 GetPC() const override { return RegPC; }
                     29: 
                     30:        void SetStepOut() override;
                     31:        bool IsStepOut() const override;
1.1.1.4 ! root       32:        bool IsOpStepIn(uint32 op) override;
1.1.1.2   root       33:        uint64 GetRegAddr(const char *name) const override;
                     34:        void BackupRegs() override { prev = cpu->reg; }
                     35:        bool ShowRegister(Console *cons, const std::vector<std::string>& args)
                     36:                override;
                     37:        const HelpMessages& GetRegisterHelp() const override;
1.1       root       38: 
1.1.1.3   root       39:        BranchHistory& GetBrHist() const override { return cpu->brhist; }
                     40:        BranchHistory& GetExHist() const override { return cpu->exhist; }
1.1.1.2   root       41: 
                     42:        bool CheckLEA(uint32 laddr) override { return false; }
1.1       root       43: 
                     44:        bool Disassemble(saddr_t laddr,
1.1.1.2   root       45:                std::string& mnemonic, std::vector<uint8>& bin) override;
1.1       root       46:        std::string FormatDisasm(const std::string& mnemonic,
1.1.1.2   root       47:                const std::vector<uint8>& bin) override;
1.1       root       48:        std::string FormatDisasmLive(const std::string& mnemonic,
1.1.1.2   root       49:                const std::vector<uint8>& bin) override;
1.1       root       50: 
1.1.1.4 ! root       51:        const char *GetExceptionName(int vector) const override;
        !            52: 
1.1       root       53:  private:
1.1.1.4 ! root       54:        m68kcpu *cpu {};                // CPU コア
        !            55:        m68kreg prev {};                // 前回のレジスタセットのコピー
1.1       root       56: 
1.1.1.2   root       57:        // 前回アクセス時の論理ページ。.addr == 0xffffffff なら無効。
1.1.1.4 ! root       58:        saddr_t last_lpage {};
        !            59:        uint32  last_ppage {};
1.1.1.2   root       60: 
1.1       root       61:        const char *CondStr(const std::vector<uint16>& ir);
                     62:        bool IsOPcc(uint16 op);
                     63:        bool IsDBcc(uint16 op);
                     64:        bool IsCond(uint16 op);
                     65: 
1.1.1.2   root       66:        static const HelpMessages HelpMsgRegister;
                     67:        void ShowRegMain(Console *cons);
                     68:        void ShowRegFPU(Console *cons);
                     69:        void ShowRegMMU(Console *cons);
                     70:        void ShowRegATC(Console *cons);
                     71:        void ShowRegOther(Console *cons);
                     72: 
1.1.1.4 ! root       73:        uint32 so_a7 {};                        // ステップアウト判定用
        !            74:        uint16 so_sr {};
1.1       root       75: };

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.