mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-07 01:00:06 +01:00
How to use the instruction editor: 1. Load an .ELF file 2. Select an instruction from any valid memory address inside any thread. 3. Press 'E' key and have fun. :P Note1: I suggest to remove the function InterpreterDisAsmFrame::DClick and use InterpreterDisAsmFrame::InstrKey to do all debugging-related actions (Add breakpoint, Edit, Step, Run, etc.) using the same keyboard layout as debuggers like OllyDbg. Note2: The final binary is 200 KB larger due to this feature. This issue should be fixed in the future. This has probably something to do with the #include's.
58 lines
1.3 KiB
C++
58 lines
1.3 KiB
C++
#pragma once
|
|
#include "Emu/Cell/PPCThread.h"
|
|
#include "Emu/Cell/PPUDecoder.h"
|
|
#include "Emu/Cell/PPUDisAsm.h"
|
|
#include "Emu/Cell/SPUDecoder.h"
|
|
#include "Emu/Cell/SPUDisAsm.h"
|
|
|
|
class InterpreterDisAsmFrame
|
|
: public wxPanel
|
|
, public ThreadBase
|
|
{
|
|
wxListView* m_list;
|
|
PPC_DisAsm* disasm;
|
|
PPC_Decoder* decoder;
|
|
u64 PC;
|
|
Array<u32> remove_markedPC;
|
|
wxTextCtrl* m_regs;
|
|
wxButton* m_btn_step;
|
|
wxButton* m_btn_run;
|
|
wxButton* m_btn_pause;
|
|
AppConnector m_app_connector;
|
|
u32 m_item_count;
|
|
wxChoice* m_choice_units;
|
|
|
|
public:
|
|
PPCThread* CPU;
|
|
|
|
public:
|
|
InterpreterDisAsmFrame(wxWindow* parent);
|
|
~InterpreterDisAsmFrame();
|
|
|
|
void UpdateUnitList();
|
|
|
|
u64 CentrePc(const u64 pc) const;
|
|
void OnSelectUnit(wxCommandEvent& event);
|
|
void OnKeyDown(wxKeyEvent& event);
|
|
void OnResize(wxSizeEvent& event);
|
|
void DoUpdate();
|
|
void ShowAddr(const u64 addr);
|
|
void WriteRegs();
|
|
|
|
void HandleCommand(wxCommandEvent& event);
|
|
void OnUpdate(wxCommandEvent& event);
|
|
void Show_Val(wxCommandEvent& event);
|
|
void Show_PC(wxCommandEvent& event);
|
|
void DoRun(wxCommandEvent& event);
|
|
void DoPause(wxCommandEvent& event);
|
|
void DoStep(wxCommandEvent& event);
|
|
void InstrKey(wxListEvent& event);
|
|
void DClick(wxListEvent& event);
|
|
|
|
void MouseWheel(wxMouseEvent& event);
|
|
bool IsBreakPoint(u64 pc);
|
|
void AddBreakPoint(u64 pc);
|
|
bool RemoveBreakPoint(u64 pc);
|
|
|
|
virtual void Task();
|
|
}; |