Annotation of nono/debugger/disasm.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: // 逆アセンブラ(共通部分)
                      8: 
                      9: #pragma once
                     10: 
                     11: #include "debugger_private.h"
                     12: 
                     13: // 逆アセンブラ抽象クラス
                     14: class Disasm
                     15: {
                     16:  public:
1.1.1.4 ! root       17:        Disasm(DebuggerMemoryStream& mem_)
        !            18:                : mem(mem_)
        !            19:        {
1.1       root       20:        }
1.1.1.4 ! root       21:        virtual ~Disasm();
1.1       root       22: 
1.1.1.4 ! root       23:        // mem.laddr の位置を1命令逆アセンブルする。
1.1       root       24:        // 成功すれば true、失敗すれば false を返す?
                     25:        // 成功すれば text に出力文字列、ir に命令バイナリがセットされている。
1.1.1.4 ! root       26:        virtual bool Exec() = 0;
1.1       root       27: 
                     28:        // 出力文字列(ダンプ)
                     29:        std::string dump {};
                     30: 
                     31:        // 出力文字列(命令)
                     32:        std::string text {};
                     33: 
                     34:        // この命令のバイナリ列
                     35:        // (メモリイメージ順)
                     36:        std::vector<uint8> bin {};
                     37: 
                     38:  protected:
1.1.1.4 ! root       39:        // メモリアクセス。
        !            40:        DebuggerMemoryStream& mem;
1.1       root       41: 
                     42:        // 継承先の Exec() の先頭で呼び出してください。
                     43:        void ExecInit() {
                     44:                text.clear();
                     45:                bin.clear();
                     46:        }
                     47: };

unix.superglobalmegacorp.com

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