2012-11-01 16:19:01 +01:00
|
|
|
// NOTE: Apologies for the quality of this code, this is really from pre-opensource Dolphin - that is, 2003.
|
|
|
|
|
|
|
|
#ifndef _DISASM_H
|
|
|
|
#define _DISASM_H
|
|
|
|
|
2013-07-28 21:01:49 -07:00
|
|
|
#include "Windows/W32Util/DialogManager.h"
|
|
|
|
#include "Windows/Debugger/CtrlDisasmView.h"
|
|
|
|
#include "Windows/Debugger/Debugger_Lists.h"
|
|
|
|
#include "Windows/Debugger/CPURegsInterface.h"
|
2013-06-30 15:51:50 -07:00
|
|
|
#include "Globals.h"
|
|
|
|
#include "Core/CPU.h"
|
|
|
|
#include "Core/MIPS/MIPSDebugInterface.h"
|
|
|
|
#include "Core/Debugger/Breakpoints.h"
|
|
|
|
#include <vector>
|
2012-11-01 16:19:01 +01:00
|
|
|
|
2013-07-28 21:01:49 -07:00
|
|
|
#include "Common/CommonWindows.h"
|
2012-11-17 22:44:29 +00:00
|
|
|
|
2012-11-01 16:19:01 +01:00
|
|
|
class CDisasm : public Dialog
|
|
|
|
{
|
|
|
|
private:
|
2013-08-16 14:19:04 +02:00
|
|
|
typedef enum { SUBWIN_MEM, SUBWIN_BREAKPOINT, SUBWIN_THREADS, SUBWIN_STACKFRAMES,
|
|
|
|
// pseudo controls
|
|
|
|
SUBWIN_NEXT, SUBWIN_FIRST } SubWindowType;
|
|
|
|
|
2013-06-28 21:33:47 -07:00
|
|
|
RECT defaultRect;
|
|
|
|
RECT defaultBreakpointRect;
|
2012-11-01 16:19:01 +01:00
|
|
|
RECT regRect;
|
|
|
|
RECT disRect;
|
2013-06-27 21:07:49 +02:00
|
|
|
RECT breakpointRect;
|
|
|
|
|
2012-11-01 16:19:01 +01:00
|
|
|
DebugInterface *cpu;
|
2013-06-28 00:26:04 +02:00
|
|
|
u64 lastTicks;
|
|
|
|
|
2013-07-30 16:19:05 +02:00
|
|
|
HWND statusBarWnd;
|
2013-07-08 17:59:34 +02:00
|
|
|
CtrlBreakpointList* breakpointList;
|
2013-07-02 23:21:20 +02:00
|
|
|
CtrlThreadList* threadList;
|
2013-08-12 22:11:00 +02:00
|
|
|
CtrlStackTraceView* stackTraceView;
|
2013-06-30 15:51:50 -07:00
|
|
|
std::vector<BreakPoint> displayedBreakPoints_;
|
|
|
|
std::vector<MemCheck> displayedMemChecks_;
|
|
|
|
|
2012-11-01 16:19:01 +01:00
|
|
|
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
2013-06-26 00:15:16 -07:00
|
|
|
void UpdateSize(WORD width, WORD height);
|
|
|
|
void SavePosition();
|
2013-07-03 22:29:35 +02:00
|
|
|
void updateThreadLabel(bool clear);
|
2013-08-16 14:19:04 +02:00
|
|
|
void changeSubWindow(SubWindowType type);
|
2013-08-17 10:49:07 +02:00
|
|
|
void stepInto();
|
|
|
|
void stepOver();
|
|
|
|
void runToLine();
|
2012-11-01 16:19:01 +01:00
|
|
|
public:
|
|
|
|
int index; //helper
|
|
|
|
|
|
|
|
CDisasm(HINSTANCE _hInstance, HWND _hParent, DebugInterface *cpu);
|
|
|
|
~CDisasm();
|
|
|
|
//
|
|
|
|
// --- tools ---
|
|
|
|
//
|
2013-06-27 21:07:49 +02:00
|
|
|
|
|
|
|
virtual void Update()
|
|
|
|
{
|
|
|
|
UpdateDialog(true);
|
2013-07-08 17:59:34 +02:00
|
|
|
breakpointList->update();
|
2013-06-27 21:07:49 +02:00
|
|
|
};
|
2012-11-01 16:19:01 +01:00
|
|
|
void UpdateDialog(bool _bComplete = false);
|
|
|
|
// SetDebugMode
|
|
|
|
void SetDebugMode(bool _bDebug);
|
|
|
|
// show dialog
|
|
|
|
void Goto(u32 addr);
|
|
|
|
void NotifyMapLoaded();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|