mirror of https://github.com/PCSX2/pcsx2.git
Debugger: Modify hotkeys, add delete breakpoint context menu button
Add assemble opcode hotkey as well Update debugger docs
This commit is contained in:
parent
f9909f4226
commit
58a9460f7c
|
@ -8,10 +8,11 @@ urlcolor: "cyan"
|
|||
# Debugger Key Bindings
|
||||
|
||||
## Disassembly View
|
||||
- `Ctrl+G` - goto
|
||||
- `Ctrl+E` - edit breakpoint
|
||||
- `Ctrl+D` - enable/disable breakpoint
|
||||
- `Ctrl+B` - add breakpoint
|
||||
- `G` - goto
|
||||
- `E` - edit breakpoint
|
||||
- `D` - enable/disable breakpoint
|
||||
- `B` - add breakpoint
|
||||
- `M` - assemble opcode
|
||||
- `Right Arrow` - follow branch/position memory view to accessed address
|
||||
- `Left Arrow` - go back one branch level/goto pc
|
||||
- `Up Arrow` - move cursor up one line
|
||||
|
@ -26,7 +27,7 @@ urlcolor: "cyan"
|
|||
|
||||
## Memory View
|
||||
|
||||
- `Ctrl+G` - goto
|
||||
- `G` - goto
|
||||
- `Ctrl+B` - add breakpoint
|
||||
- `Left Arrow` - move cursor back one byte/nibble
|
||||
- `Right Arrow` - move cursor ahead one byte/nibble
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2014 PCSX2 Dev Team
|
||||
* Copyright (C) 2002-2021 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
|
@ -799,10 +799,17 @@ void CtrlDisassemblyView::keydownEvent(wxKeyEvent& evt)
|
|||
{
|
||||
u32 windowEnd = manager.getNthNextAddress(windowStart,visibleRows);
|
||||
|
||||
if (evt.ControlDown())
|
||||
{
|
||||
switch (evt.GetKeyCode())
|
||||
switch (evt.GetKeyCode())
|
||||
{
|
||||
case 'g':
|
||||
case 'G':
|
||||
{
|
||||
u64 addr;
|
||||
if (!executeExpressionWindow(this, cpu, addr))
|
||||
return;
|
||||
gotoAddress(addr);
|
||||
}
|
||||
break;
|
||||
case 'd':
|
||||
case 'D':
|
||||
toggleBreakpoint(true);
|
||||
|
@ -813,40 +820,21 @@ void CtrlDisassemblyView::keydownEvent(wxKeyEvent& evt)
|
|||
break;
|
||||
case 'b':
|
||||
case 'B':
|
||||
{
|
||||
BreakpointWindow bpw(this,cpu);
|
||||
if (bpw.ShowModal() == wxID_OK)
|
||||
{
|
||||
bpw.addBreakpoint();
|
||||
postEvent(debEVT_UPDATE,0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'g':
|
||||
case 'G':
|
||||
{
|
||||
u64 addr;
|
||||
if (!executeExpressionWindow(this,cpu,addr))
|
||||
return;
|
||||
gotoAddress(addr);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
evt.Skip();
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (evt.GetEventType() == wxEVT_CHAR && evt.GetKeyCode() >= 0x20 && evt.GetKeyCode() < 0x80)
|
||||
{
|
||||
std::string str;
|
||||
str += (char) evt.GetKeyCode();
|
||||
|
||||
assembleOpcode(curAddress,str);
|
||||
return;
|
||||
BreakpointWindow bpw(this, cpu);
|
||||
if (bpw.ShowModal() == wxID_OK)
|
||||
{
|
||||
bpw.addBreakpoint();
|
||||
postEvent(debEVT_UPDATE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
switch (evt.GetKeyCode())
|
||||
break;
|
||||
case 'm':
|
||||
case 'M':
|
||||
{
|
||||
assembleOpcode(curAddress, "");
|
||||
}
|
||||
break;
|
||||
case WXK_LEFT:
|
||||
if (jumpStack.empty())
|
||||
{
|
||||
|
@ -909,7 +897,6 @@ void CtrlDisassemblyView::keydownEvent(wxKeyEvent& evt)
|
|||
evt.Skip();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
redraw();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2014 PCSX2 Dev Team
|
||||
* Copyright (C) 2002-2021 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
|
@ -504,6 +504,15 @@ void CtrlMemView::keydownEvent(wxKeyEvent& evt)
|
|||
|
||||
switch (evt.GetKeyCode())
|
||||
{
|
||||
case 'g':
|
||||
case 'G':
|
||||
{
|
||||
u64 addr;
|
||||
if (!executeExpressionWindow(this, cpu, addr))
|
||||
return;
|
||||
gotoAddress(addr, true);
|
||||
}
|
||||
break;
|
||||
case WXK_LEFT:
|
||||
scrollCursor(-1);
|
||||
break;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2014 PCSX2 Dev Team
|
||||
* Copyright (C) 2002-2021 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
|
@ -169,6 +169,7 @@ enum BreakpointListMenuIdentifiers
|
|||
{
|
||||
ID_BREAKPOINTLIST_ENABLE = 1,
|
||||
ID_BREAKPOINTLIST_EDIT,
|
||||
ID_BREAKPOINTLIST_DELETE,
|
||||
ID_BREAKPOINTLIST_ADDNEW,
|
||||
};
|
||||
|
||||
|
@ -458,6 +459,9 @@ void BreakpointList::onPopupClick(wxCommandEvent& evt)
|
|||
case ID_BREAKPOINTLIST_EDIT:
|
||||
editBreakpoint(index);
|
||||
break;
|
||||
case ID_BREAKPOINTLIST_DELETE:
|
||||
removeBreakpoint(index);
|
||||
break;
|
||||
case ID_BREAKPOINTLIST_ADDNEW:
|
||||
postEvent(debEVT_BREAKPOINTWINDOW,0);
|
||||
break;
|
||||
|
@ -477,6 +481,7 @@ void BreakpointList::showMenu(const wxPoint& pos)
|
|||
{
|
||||
menu.AppendCheckItem(ID_BREAKPOINTLIST_ENABLE, L"Enable");
|
||||
menu.Append(ID_BREAKPOINTLIST_EDIT, L"Edit");
|
||||
menu.Append(ID_BREAKPOINTLIST_DELETE, L"Delete");
|
||||
menu.AppendSeparator();
|
||||
|
||||
// check if the breakpoint is enabled
|
||||
|
|
Loading…
Reference in New Issue