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

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: 
1.1.1.6 ! root        7: //
        !             8: // デバッガ (M680x0 依存部分)
        !             9: //
        !            10: 
1.1       root       11: #pragma once
                     12: 
                     13: #include "debugger_private.h"
1.1.1.2   root       14: #include "mpu680x0.h"
1.1       root       15: #include "m68030.h"
                     16: #include "m68030disasm.h"
                     17: 
                     18: class DebuggerMD_m680x0 : public DebuggerMD
                     19: {
1.1.1.2   root       20:        using inherited = DebuggerMD;
1.1       root       21:  public:
1.1.1.2   root       22:        DebuggerMD_m680x0(Debugger *parent, m68kcpu *cpu);
                     23:        ~DebuggerMD_m680x0() override;
                     24: 
1.1.1.6 ! root       25:        void ReqSet(uint32 flag) override { /*TODO*/ }
        !            26:        void ReqClr(uint32 flag) override { /*TODO*/ }
1.1.1.2   root       27: 
                     28:        bool IsSuper() const override { return cpu->reg.s; }
                     29:        bool MMUEnabled() const override { return cpu->mmu_enable; }
1.1.1.5   root       30:        uint64 TranslateAddr(saddr_t laddr, bool lookup) const override;
1.1.1.2   root       31: 
                     32:        uint32 GetPC() const override { return RegPC; }
                     33: 
                     34:        void SetStepOut() override;
                     35:        bool IsStepOut() const override;
1.1.1.5   root       36:        bool IsOpStepIn(DebuggerMemoryStream& mem) override;
1.1.1.2   root       37:        uint64 GetRegAddr(const char *name) const override;
                     38:        void BackupRegs() override { prev = cpu->reg; }
1.1.1.6 ! root       39:        bool ShowRegister(FILE *, const std::vector<std::string>& args) override;
1.1.1.5   root       40:        const HelpMessages& GetHelpListReg() const override;
                     41:        const HelpMessages& GetHelpReg() const override;
1.1       root       42: 
1.1.1.3   root       43:        BranchHistory& GetBrHist() const override { return cpu->brhist; }
                     44:        BranchHistory& GetExHist() const override { return cpu->exhist; }
1.1.1.2   root       45: 
                     46:        bool CheckLEA(uint32 laddr) override { return false; }
1.1       root       47: 
1.1.1.5   root       48:        bool Disassemble(DebuggerMemoryStream& mem,
1.1.1.2   root       49:                std::string& mnemonic, std::vector<uint8>& bin) override;
1.1       root       50:        std::string FormatDisasm(const std::string& mnemonic,
1.1.1.2   root       51:                const std::vector<uint8>& bin) override;
1.1       root       52:        std::string FormatDisasmLive(const std::string& mnemonic,
1.1.1.2   root       53:                const std::vector<uint8>& bin) override;
1.1       root       54: 
                     55:  private:
1.1.1.4   root       56:        m68kcpu *cpu {};                // CPU コア
                     57:        m68kreg prev {};                // 前回のレジスタセットのコピー
1.1       root       58: 
                     59:        const char *CondStr(const std::vector<uint16>& ir);
                     60:        bool IsOPcc(uint16 op);
                     61:        bool IsDBcc(uint16 op);
                     62:        bool IsCond(uint16 op);
                     63: 
1.1.1.5   root       64:        static const HelpMessages HelpListReg;
                     65:        static const HelpMessages HelpReg;
1.1.1.6 ! root       66:        void ShowRegMain(FILE *);
        !            67:        void ShowRegFPU(FILE *);
        !            68:        void ShowRegMMU(FILE *);
        !            69:        void ShowRegATC();
        !            70:        void ShowRegOther();
1.1.1.2   root       71: 
1.1.1.4   root       72:        uint32 so_a7 {};                        // ステップアウト判定用
                     73:        uint16 so_sr {};
1.1       root       74: };

unix.superglobalmegacorp.com

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