mirror of https://github.com/PCSX2/pcsx2.git
Debugger Disassembly: Add 'NOP Instruction(s)' Context menu action
This commit is contained in:
parent
ec5a91b89a
commit
eac90c6b42
|
@ -60,6 +60,8 @@ void DisassemblyWidget::CreateCustomContextMenu()
|
|||
m_contextMenu->addSeparator();
|
||||
m_contextMenu->addAction(action = new QAction(tr("Assemble new Instruction(s)"), this));
|
||||
connect(action, &QAction::triggered, this, &DisassemblyWidget::contextAssembleInstruction);
|
||||
m_contextMenu->addAction(action = new QAction(tr("NOP Instruction(s)"), this));
|
||||
connect(action, &QAction::triggered, this, &DisassemblyWidget::contextNoopInstruction);
|
||||
m_contextMenu->addSeparator();
|
||||
m_contextMenu->addAction(action = new QAction(tr("Run to Cursor"), this));
|
||||
connect(action, &QAction::triggered, this, &DisassemblyWidget::contextRunToCursor);
|
||||
|
@ -136,6 +138,17 @@ void DisassemblyWidget::contextAssembleInstruction()
|
|||
}
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextNoopInstruction()
|
||||
{
|
||||
Host::RunOnCPUThread([this, start = m_selectedAddressStart, end = m_selectedAddressEnd, cpu = m_cpu] {
|
||||
for (u32 i = start; i <= end; i += 4)
|
||||
{
|
||||
cpu->write32(i, 0x00);
|
||||
}
|
||||
QtHost::RunOnUIThread([this] { VMUpdate(); });
|
||||
});
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextRunToCursor()
|
||||
{
|
||||
Host::RunOnCPUThread([&] { CBreakPoints::AddBreakPoint(m_cpu->getCpuType(), m_selectedAddressStart); });
|
||||
|
|
|
@ -55,6 +55,7 @@ public slots:
|
|||
void contextCopyInstructionHex();
|
||||
void contextCopyInstructionText();
|
||||
void contextAssembleInstruction();
|
||||
void contextNoopInstruction();
|
||||
void contextRunToCursor();
|
||||
void contextJumpToCursor();
|
||||
void contextToggleBreakpoint();
|
||||
|
|
Loading…
Reference in New Issue