mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Scan/remove -> edit symbols
This commit is contained in:
+2
-2
@@ -2373,8 +2373,8 @@ set(WindowsFiles
|
||||
Windows/Debugger/Debugger_VFPUDlg.h
|
||||
Windows/Debugger/WatchItemWindow.cpp
|
||||
Windows/Debugger/WatchItemWindow.h
|
||||
Windows/Debugger/ScanRemoveWindow.cpp
|
||||
Windows/Debugger/ScanRemoveWindow.h
|
||||
Windows/Debugger/EditSymbolsWindow.cpp
|
||||
Windows/Debugger/EditSymbolsWindow.h
|
||||
Windows/GEDebugger/CtrlDisplayListView.cpp
|
||||
Windows/GEDebugger/SimpleGLWindow.cpp
|
||||
Windows/GEDebugger/TabState.cpp
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "Windows/Debugger/Debugger_MemoryDlg.h"
|
||||
#include "Windows/Debugger/DebuggerShared.h"
|
||||
#include "Windows/Debugger/BreakpointWindow.h"
|
||||
#include "Windows/Debugger/ScanRemoveWindow.h"
|
||||
#include "Windows/Debugger/EditSymbolsWindow.h"
|
||||
#include "Windows/main.h"
|
||||
|
||||
#include "Common/CommonWindows.h"
|
||||
@@ -979,11 +979,11 @@ void CtrlDisAsmView::onMouseUp(WPARAM wParam, LPARAM lParam, int button)
|
||||
NopInstructions(selectRangeStart, selectRangeEnd);
|
||||
redraw();
|
||||
break;
|
||||
case ID_DISASM_SCANREMOVE:
|
||||
case ID_DISASM_EDITSYMBOLS:
|
||||
{
|
||||
ScanRemoveWindow srw(wnd, debugger);
|
||||
if (srw.exec()) {
|
||||
srw.eval();
|
||||
EditSymbolsWindow esw(wnd, debugger);
|
||||
if (esw.exec()) {
|
||||
esw.eval();
|
||||
SendMessage(GetParent(wnd), WM_DEB_MAPLOADED, 0, 0);
|
||||
redraw();
|
||||
}
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
#include "ScanRemoveWindow.h"
|
||||
#include "EditSymbolsWindow.h"
|
||||
#include "../resource.h"
|
||||
|
||||
|
||||
bool ScanRemoveWindow::GetCheckState(HWND hwnd, int dlgItem) {
|
||||
bool EditSymbolsWindow::GetCheckState(HWND hwnd, int dlgItem) {
|
||||
return SendMessage(GetDlgItem(hwnd, dlgItem), BM_GETCHECK, 0, 0) != 0;
|
||||
}
|
||||
|
||||
bool ScanRemoveWindow::fetchDialogData(HWND hwnd)
|
||||
bool EditSymbolsWindow::fetchDialogData(HWND hwnd)
|
||||
{
|
||||
char str[256], errorMessage[512];
|
||||
PostfixExpression exp;
|
||||
|
||||
scan_ = GetCheckState(hwnd, IDC_SCANREMOVE_SCAN);
|
||||
scan_ = GetCheckState(hwnd, IDC_EDITSYMBOLS_SCAN);
|
||||
|
||||
// Parse the address
|
||||
GetWindowTextA(GetDlgItem(hwnd, IDC_SCANREMOVE_ADDRESS), str, 256);
|
||||
GetWindowTextA(GetDlgItem(hwnd, IDC_EDITSYMBOLS_ADDRESS), str, 256);
|
||||
|
||||
if (cpu->initExpression(str, exp) == false)
|
||||
{
|
||||
@@ -30,7 +30,7 @@ bool ScanRemoveWindow::fetchDialogData(HWND hwnd)
|
||||
}
|
||||
|
||||
// Parse the size
|
||||
GetWindowTextA(GetDlgItem(hwnd, IDC_SCANREMOVE_SIZE), str, 256);
|
||||
GetWindowTextA(GetDlgItem(hwnd, IDC_EDITSYMBOLS_SIZE), str, 256);
|
||||
|
||||
if (cpu->initExpression(str, exp) == false)
|
||||
{
|
||||
@@ -54,14 +54,14 @@ bool ScanRemoveWindow::fetchDialogData(HWND hwnd)
|
||||
return true;
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK ScanRemoveWindow::StaticDlgFunc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam) {
|
||||
ScanRemoveWindow *thiz;
|
||||
INT_PTR CALLBACK EditSymbolsWindow::StaticDlgFunc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam) {
|
||||
EditSymbolsWindow *thiz;
|
||||
if (iMsg == WM_INITDIALOG) {
|
||||
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)lParam);
|
||||
thiz = (ScanRemoveWindow *)lParam;
|
||||
thiz = (EditSymbolsWindow *)lParam;
|
||||
}
|
||||
else {
|
||||
thiz = (ScanRemoveWindow *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||
thiz = (EditSymbolsWindow *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||
}
|
||||
|
||||
if (!thiz)
|
||||
@@ -69,7 +69,7 @@ INT_PTR CALLBACK ScanRemoveWindow::StaticDlgFunc(HWND hWnd, UINT iMsg, WPARAM wP
|
||||
return thiz->DlgFunc(hWnd, iMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
INT_PTR ScanRemoveWindow::DlgFunc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR EditSymbolsWindow::DlgFunc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
char str[128];
|
||||
|
||||
@@ -78,22 +78,22 @@ INT_PTR ScanRemoveWindow::DlgFunc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lP
|
||||
case WM_INITDIALOG:
|
||||
|
||||
// Set the radiobutton values
|
||||
SendMessage(GetDlgItem(hwnd, IDC_SCANREMOVE_SCAN), BM_SETCHECK, scan_ ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
SendMessage(GetDlgItem(hwnd, IDC_SCANREMOVE_REMOVE), BM_SETCHECK, scan_ ? BST_UNCHECKED : BST_CHECKED, 0);
|
||||
SendMessage(GetDlgItem(hwnd, IDC_EDITSYMBOLS_SCAN), BM_SETCHECK, scan_ ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
SendMessage(GetDlgItem(hwnd, IDC_EDITSYMBOLS_REMOVE), BM_SETCHECK, scan_ ? BST_UNCHECKED : BST_CHECKED, 0);
|
||||
|
||||
// Set the text in the textboxes
|
||||
if (address_ != -1) {
|
||||
snprintf(str, sizeof(str), "0x%08X", address_);
|
||||
SetWindowTextA(GetDlgItem(hwnd, IDC_SCANREMOVE_ADDRESS), str);
|
||||
SetWindowTextA(GetDlgItem(hwnd, IDC_EDITSYMBOLS_ADDRESS), str);
|
||||
}
|
||||
snprintf(str, sizeof(str), "0x%08X", size_);
|
||||
SetWindowTextA(GetDlgItem(hwnd, IDC_SCANREMOVE_SIZE), str);
|
||||
SetWindowTextA(GetDlgItem(hwnd, IDC_EDITSYMBOLS_SIZE), str);
|
||||
|
||||
return TRUE;
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDC_SCANREMOVE_SCAN:
|
||||
case IDC_EDITSYMBOLS_SCAN:
|
||||
switch (HIWORD(wParam))
|
||||
{
|
||||
case BN_CLICKED:
|
||||
@@ -101,7 +101,7 @@ INT_PTR ScanRemoveWindow::DlgFunc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lP
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case IDC_SCANREMOVE_REMOVE:
|
||||
case IDC_EDITSYMBOLS_REMOVE:
|
||||
switch (HIWORD(wParam))
|
||||
{
|
||||
case BN_CLICKED:
|
||||
@@ -109,7 +109,7 @@ INT_PTR ScanRemoveWindow::DlgFunc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lP
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case IDC_SCANREMOVE_OK:
|
||||
case IDC_EDITSYMBOLS_OK:
|
||||
switch (HIWORD(wParam))
|
||||
{
|
||||
case BN_CLICKED:
|
||||
@@ -119,7 +119,7 @@ INT_PTR ScanRemoveWindow::DlgFunc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lP
|
||||
break;
|
||||
};
|
||||
break;
|
||||
case IDC_SCANREMOVE_CANCEL:
|
||||
case IDC_EDITSYMBOLS_CANCEL:
|
||||
switch (HIWORD(wParam))
|
||||
{
|
||||
case BN_CLICKED:
|
||||
@@ -141,16 +141,16 @@ INT_PTR ScanRemoveWindow::DlgFunc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lP
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool ScanRemoveWindow::exec() {
|
||||
return DialogBoxParam(GetModuleHandle(0), MAKEINTRESOURCE(IDD_SCANREMOVE), parentHwnd, StaticDlgFunc, (LPARAM)this) != 0;
|
||||
bool EditSymbolsWindow::exec() {
|
||||
return DialogBoxParam(GetModuleHandle(0), MAKEINTRESOURCE(IDD_EDITSYMBOLS), parentHwnd, StaticDlgFunc, (LPARAM)this) != 0;
|
||||
}
|
||||
|
||||
void ScanRemoveWindow::Scan() {
|
||||
void EditSymbolsWindow::Scan() {
|
||||
bool insertSymbols = MIPSAnalyst::ScanForFunctions(address_, address_ + size_ - 1, true);
|
||||
MIPSAnalyst::FinalizeScan(insertSymbols);
|
||||
}
|
||||
|
||||
void ScanRemoveWindow::Remove() {
|
||||
void EditSymbolsWindow::Remove() {
|
||||
u32 func_address = g_symbolMap->GetFunctionStart(address_);
|
||||
if (func_address == SymbolMap::INVALID_ADDRESS) {
|
||||
func_address = g_symbolMap->GetNextSymbolAddress(address_, SymbolType::ST_FUNCTION);
|
||||
@@ -182,7 +182,7 @@ void ScanRemoveWindow::Remove() {
|
||||
}
|
||||
}
|
||||
|
||||
void ScanRemoveWindow::eval() {
|
||||
void EditSymbolsWindow::eval() {
|
||||
if (scan_) {
|
||||
Scan();
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "Core/Debugger/DisassemblyManager.h"
|
||||
#include "Core/MemMap.h"
|
||||
|
||||
class ScanRemoveWindow {
|
||||
class EditSymbolsWindow {
|
||||
HWND parentHwnd;
|
||||
DebugInterface* cpu;
|
||||
|
||||
@@ -27,7 +27,7 @@ class ScanRemoveWindow {
|
||||
INT_PTR DlgFunc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
public:
|
||||
ScanRemoveWindow(HWND parent, DebugInterface* cpu) : cpu(cpu) {
|
||||
EditSymbolsWindow(HWND parent, DebugInterface* cpu) : cpu(cpu) {
|
||||
parentHwnd = parent;
|
||||
scan_ = true;
|
||||
address_ = -1;
|
||||
@@ -844,7 +844,7 @@
|
||||
<ClCompile Include="GPU\D3D11Context.cpp" />
|
||||
<ClCompile Include="GPU\D3D9Context.cpp" />
|
||||
<ClCompile Include="Debugger\BreakpointWindow.cpp" />
|
||||
<ClCompile Include="Debugger\ScanRemoveWindow.cpp" />
|
||||
<ClCompile Include="Debugger\EditSymbolsWindow.cpp" />
|
||||
<ClCompile Include="Debugger\CtrlDisAsmView.cpp" />
|
||||
<ClCompile Include="Debugger\CtrlMemView.cpp" />
|
||||
<ClCompile Include="Debugger\CtrlRegisterList.cpp" />
|
||||
@@ -1401,7 +1401,7 @@
|
||||
<ClInclude Include="GPU\D3D11Context.h" />
|
||||
<ClInclude Include="GPU\D3D9Context.h" />
|
||||
<ClInclude Include="Debugger\BreakpointWindow.h" />
|
||||
<ClInclude Include="Debugger\ScanRemoveWindow.h" />
|
||||
<ClInclude Include="Debugger\EditSymbolsWindow.h" />
|
||||
<ClInclude Include="Debugger\CtrlDisAsmView.h" />
|
||||
<ClInclude Include="Debugger\CtrlMemView.h" />
|
||||
<ClInclude Include="Debugger\CtrlRegisterList.h" />
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
<ClCompile Include="Debugger\WatchItemWindow.cpp">
|
||||
<Filter>Windows\Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\ScanRemoveWindow.cpp">
|
||||
<ClCompile Include="Debugger\EditSymbolsWindow.cpp">
|
||||
<Filter>Windows\Debugger</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
@@ -571,7 +571,7 @@
|
||||
<ClInclude Include="Debugger\WatchItemWindow.h">
|
||||
<Filter>Windows\Debugger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Debugger\ScanRemoveWindow.h">
|
||||
<ClInclude Include="Debugger\EditSymbolsWindow.h">
|
||||
<Filter>Windows\Debugger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\SDL\CocoaBarItems.h">
|
||||
|
||||
+9
-9
@@ -380,19 +380,19 @@ BEGIN
|
||||
PUSHBUTTON "Cancel",IDC_BREAKPOINT_CANCEL,186,98,42,14
|
||||
END
|
||||
|
||||
IDD_SCANREMOVE DIALOGEX 0, 0, 236, 72
|
||||
IDD_EDITSYMBOLS DIALOGEX 0, 0, 236, 72
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Edit functions"
|
||||
CAPTION "Edit symbols"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
LTEXT "Address",IDC_STATIC,7,8,27,8
|
||||
EDITTEXT IDC_SCANREMOVE_ADDRESS,41,7,69,14,ES_AUTOHSCROLL
|
||||
CONTROL "Scan in range",IDC_SCANREMOVE_SCAN,"Button",BS_AUTORADIOBUTTON,144,8,70,10
|
||||
CONTROL "Remove in range",IDC_SCANREMOVE_REMOVE,"Button",BS_AUTORADIOBUTTON,144,27,70,10
|
||||
EDITTEXT IDC_EDITSYMBOLS_ADDRESS,41,7,69,14,ES_AUTOHSCROLL
|
||||
CONTROL "Scan in range",IDC_EDITSYMBOLS_SCAN,"Button",BS_AUTORADIOBUTTON,144,8,70,10
|
||||
CONTROL "Remove in range",IDC_EDITSYMBOLS_REMOVE,"Button",BS_AUTORADIOBUTTON,144,27,70,10
|
||||
LTEXT "Size",IDC_STATIC,7,27,14,8
|
||||
EDITTEXT IDC_SCANREMOVE_SIZE,41,25,69,14,ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDC_SCANREMOVE_OK,144,51,41,14
|
||||
PUSHBUTTON "Cancel",IDC_SCANREMOVE_CANCEL,186,51,42,14
|
||||
EDITTEXT IDC_EDITSYMBOLS_SIZE,41,25,69,14,ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDC_EDITSYMBOLS_OK,144,51,41,14
|
||||
PUSHBUTTON "Cancel",IDC_EDITSYMBOLS_CANCEL,186,51,42,14
|
||||
END
|
||||
|
||||
IDD_DUMPMEMORY DIALOGEX 0, 0, 230, 100
|
||||
@@ -770,7 +770,7 @@ BEGIN
|
||||
MENUITEM "Remove Function", ID_DISASM_REMOVEFUNCTION
|
||||
MENUITEM "Add Function Here", ID_DISASM_ADDFUNCTION
|
||||
MENUITEM "NOP instruction(s)", ID_DISASM_NOPINSTRUCTION
|
||||
MENUITEM "Scan / remove functions...", ID_DISASM_SCANREMOVE
|
||||
MENUITEM "Edit symbols...", ID_DISASM_EDITSYMBOLS
|
||||
END
|
||||
POPUP "reglist"
|
||||
BEGIN
|
||||
|
||||
+8
-8
@@ -61,7 +61,7 @@
|
||||
#define IDD_GEDBG_TAB_MATRICES 255
|
||||
#define IDD_GEDBG_STEPCOUNT 256
|
||||
#define IDD_CPUWATCH 257
|
||||
#define IDD_SCANREMOVE 258
|
||||
#define IDD_EDITSYMBOLS 258
|
||||
|
||||
#define IDC_STOPGO 1001
|
||||
#define IDC_ADDRESS 1002
|
||||
@@ -123,12 +123,12 @@
|
||||
#define IDC_SHOWOFFSETS 1200
|
||||
#define IDC_GEDBG_PRIMCOUNTER 1201
|
||||
#define IDC_BUTTON_SEARCH 1204
|
||||
#define IDC_SCANREMOVE_SCAN 1205
|
||||
#define IDC_SCANREMOVE_REMOVE 1206
|
||||
#define IDC_SCANREMOVE_ADDRESS 1207
|
||||
#define IDC_SCANREMOVE_SIZE 1208
|
||||
#define IDC_SCANREMOVE_OK 1209
|
||||
#define IDC_SCANREMOVE_CANCEL 1210
|
||||
#define IDC_EDITSYMBOLS_SCAN 1205
|
||||
#define IDC_EDITSYMBOLS_REMOVE 1206
|
||||
#define IDC_EDITSYMBOLS_ADDRESS 1207
|
||||
#define IDC_EDITSYMBOLS_SIZE 1208
|
||||
#define IDC_EDITSYMBOLS_OK 1209
|
||||
#define IDC_EDITSYMBOLS_CANCEL 1210
|
||||
|
||||
#define ID_FILE_EXIT 40000
|
||||
#define ID_DEBUG_SAVEMAPFILE 40001
|
||||
@@ -353,7 +353,7 @@
|
||||
#define IDC_DISASM_FMT_INT 40233
|
||||
#define IDC_DISASM_FMT_FLOAT 40234
|
||||
#define IDC_DISASM_FMT_STR 40235
|
||||
#define ID_DISASM_SCANREMOVE 40236
|
||||
#define ID_DISASM_EDITSYMBOLS 40236
|
||||
|
||||
|
||||
// Dummy option to let the buffered rendering hotkey cycle through all the options.
|
||||
|
||||
Reference in New Issue
Block a user