Annotation of nono/debugger/debugger_m88xx0.h, revision 1.1.1.9

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.7   root        7: //
                      8: // デバッガ (M88xx0 依存部分)
                      9: //
                     10: 
1.1       root       11: #pragma once
                     12: 
                     13: #include "debugger_private.h"
1.1.1.2   root       14: #include "mpu88xx0.h"
1.1       root       15: #include "m88100disasm.h"
                     16: 
                     17: class DebuggerMD_m88xx0 : public DebuggerMD
                     18: {
1.1.1.2   root       19:        using inherited = DebuggerMD;
1.1       root       20:  public:
1.1.1.8   root       21:        DebuggerMD_m88xx0(Debugger *parent_);
1.1.1.2   root       22:        ~DebuggerMD_m88xx0() override;
1.1       root       23: 
1.1.1.8   root       24:        CPUState GetCPUState() const override { return (CPUState)cpu->GetState(); }
                     25:        bool IsSuper() const override { return cpu->IsSuper(); }
1.1.1.2   root       26:        bool MMUEnabled() const override;
1.1.1.9 ! root       27:        busaddr TranslateAddr(busaddr laddr) const override;
1.1       root       28: 
1.1.1.8   root       29:        uint32 GetPC() const override { return cpu->GetPPC(); }
1.1       root       30: 
1.1.1.2   root       31:        void SetStepOut() override;
                     32:        bool IsStepOut() const override;
1.1.1.5   root       33:        bool IsOpStepIn(DebuggerMemoryStream& mem) override;
1.1.1.2   root       34:        uint64 GetRegAddr(const char *name) const override;
                     35:        void BackupRegs() override;
1.1.1.7   root       36:        bool ShowRegister(FILE *, const std::vector<std::string>& args) override;
1.1.1.5   root       37:        const HelpMessages& GetHelpListReg() const override;
                     38:        const HelpMessages& GetHelpReg() const override;
1.1.1.2   root       39: 
                     40:        bool CheckLEA(uint32 laddr) override {
1.1       root       41:                bool rv = cpu->lastaddr == laddr;
1.1.1.8   root       42:                cpu->lastaddr = (uint64)-1;     // XXX: ていうかここでクリアはおかしい
1.1       root       43:                return rv;
                     44:        }
                     45: 
1.1.1.8   root       46:        std::string Disassemble(DebuggerMemoryStream& mem) override;
1.1       root       47: 
                     48:  private:
1.1.1.8   root       49:        MPU88xx0Device *cpu {}; // MPU デバイス
                     50:        m88200 *cmmu0 {};               // 命令 CMMU
                     51:        m88200 *cmmu1 {};               // データ CMMU
1.1.1.4   root       52:        m88100reg prev {};              // 前回のレジスタセットのコピー
1.1.1.2   root       53: 
1.1.1.4   root       54:        static bool IsBB0(uint32 op);
                     55:        static bool IsTB0(uint32 op);
1.1.1.2   root       56:        static bool IsBBTB0(uint32 op);
                     57:        static bool IsBB1(uint32 op);
                     58:        static bool IsTB1(uint32 op);
                     59:        static bool IsBBTB1(uint32 op);
                     60:        const char *CondStr(uint32 op);
                     61: 
1.1.1.5   root       62:        static const HelpMessages HelpListReg;
                     63:        static const HelpMessages HelpReg;
1.1.1.2   root       64:        bool MatchCMMUCmd(const std::string& cmdname, const char *name, int *);
1.1.1.7   root       65:        void ShowRegMain();
                     66:        bool ShowRegCache(FILE *, const std::vector<std::string>& args, int id);
                     67:        void ShowRegCacheOverview(m88200 *cmmu);
                     68:        void ShowRegCacheSet(m88200 *cmmu, int setidx);
                     69:        void ShowRegCtrl();
                     70:        void ShowRegFPU();
                     71:        void ShowRegOther();
1.1.1.2   root       72: 
                     73:        // cmp 命令後の分岐命令で結果レジスタを表示するため、
                     74:        // cmp 命令のデスティネーションレジスタを覚えておく。
                     75:        // -1 なら該当しないの意。
1.1.1.4   root       76:        int cmp_rd {};
1.1.1.2   root       77: 
1.1.1.8   root       78:        const BranchHistory *brhist {};
                     79: 
1.1.1.4   root       80:        uint32 so_r1 {};                // ステップアウト判定用
1.1       root       81: };

unix.superglobalmegacorp.com

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