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->addSeparator();
|
||||||
m_contextMenu->addAction(action = new QAction(tr("Assemble new Instruction(s)"), this));
|
m_contextMenu->addAction(action = new QAction(tr("Assemble new Instruction(s)"), this));
|
||||||
connect(action, &QAction::triggered, this, &DisassemblyWidget::contextAssembleInstruction);
|
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->addSeparator();
|
||||||
m_contextMenu->addAction(action = new QAction(tr("Run to Cursor"), this));
|
m_contextMenu->addAction(action = new QAction(tr("Run to Cursor"), this));
|
||||||
connect(action, &QAction::triggered, this, &DisassemblyWidget::contextRunToCursor);
|
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()
|
void DisassemblyWidget::contextRunToCursor()
|
||||||
{
|
{
|
||||||
Host::RunOnCPUThread([&] { CBreakPoints::AddBreakPoint(m_cpu->getCpuType(), m_selectedAddressStart); });
|
Host::RunOnCPUThread([&] { CBreakPoints::AddBreakPoint(m_cpu->getCpuType(), m_selectedAddressStart); });
|
||||||
|
|
|
@ -55,6 +55,7 @@ public slots:
|
||||||
void contextCopyInstructionHex();
|
void contextCopyInstructionHex();
|
||||||
void contextCopyInstructionText();
|
void contextCopyInstructionText();
|
||||||
void contextAssembleInstruction();
|
void contextAssembleInstruction();
|
||||||
|
void contextNoopInstruction();
|
||||||
void contextRunToCursor();
|
void contextRunToCursor();
|
||||||
void contextJumpToCursor();
|
void contextJumpToCursor();
|
||||||
void contextToggleBreakpoint();
|
void contextToggleBreakpoint();
|
||||||
|
|
Loading…
Reference in New Issue