|
|
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.5 root 7: //
8: // 逆アセンブラ (共通部分)
9: //
1.1 root 10:
11: #pragma once
12:
1.1.1.6 root 13: #include "monitor.h"
1.1 root 14: #include "debugger_private.h"
15:
1.1.1.6 root 16: // 逆アセンブラ(1行分)の基本クラス。
17: class DisasmLine
1.1 root 18: {
19: public:
1.1.1.6 root 20: virtual ~DisasmLine();
1.1 root 21:
1.1.1.6 root 22: // mem の位置を1命令逆アセンブルする。
1.1 root 23: // 成功すれば true、失敗すれば false を返す?
24: // 成功すれば text に出力文字列、ir に命令バイナリがセットされている。
1.1.1.6 root 25: virtual bool Exec(DebuggerMemoryStream *memp) = 0;
1.1 root 26:
27: // 出力文字列(ダンプ)
28: std::string dump {};
29:
30: // 出力文字列(命令)
31: std::string text {};
32:
1.1.1.6 root 33: // 別名 (m88k で使う)
34: std::string alttext {};
35:
1.1 root 36: // この命令のバイナリ列
37: // (メモリイメージ順)
38: std::vector<uint8> bin {};
39:
1.1.1.6 root 40: // メモリアクセス
41: DebuggerMemoryStream *mem {};
1.1 root 42:
1.1.1.6 root 43: protected:
44: // 継承先の Exec() の先頭で呼び出すこと。
45: void ExecInit(DebuggerMemoryStream *mem_) {
46: mem = mem_;
47: dump.clear();
1.1 root 48: text.clear();
1.1.1.6 root 49: alttext.clear();
1.1 root 50: bin.clear();
51: }
52: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.