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