mirror of https://github.com/PCSX2/pcsx2.git
Debugger: Provide visual feedback of a breakpoints enable setting
This commit is contained in:
parent
593f977621
commit
132726bc45
|
@ -377,6 +377,21 @@ void DisassemblyWidget::paintEvent(QPaintEvent* event)
|
||||||
QString lineString = DisassemblyStringFromAddress(rowAddress, painter.font(), curPC, rowAddress == m_selectedAddressStart);
|
QString lineString = DisassemblyStringFromAddress(rowAddress, painter.font(), curPC, rowAddress == m_selectedAddressStart);
|
||||||
|
|
||||||
painter.drawText(2, i * m_rowHeight, w, m_rowHeight, Qt::AlignLeft, lineString);
|
painter.drawText(2, i * m_rowHeight, w, m_rowHeight, Qt::AlignLeft, lineString);
|
||||||
|
|
||||||
|
// Breakpoint marker
|
||||||
|
bool enabled;
|
||||||
|
if(CBreakPoints::IsAddressBreakPoint(m_cpu->getCpuType(), rowAddress, &enabled) && !CBreakPoints::IsTempBreakPoint(m_cpu->getCpuType(), rowAddress))
|
||||||
|
{
|
||||||
|
if(enabled)
|
||||||
|
{
|
||||||
|
painter.setPen(Qt::green);
|
||||||
|
painter.drawText(2, i * m_rowHeight, w, m_rowHeight, Qt::AlignLeft, "\u25A0");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
painter.drawText(2, i * m_rowHeight, w, m_rowHeight, Qt::AlignLeft, "\u2612");
|
||||||
|
}
|
||||||
|
}
|
||||||
alternate = !alternate;
|
alternate = !alternate;
|
||||||
}
|
}
|
||||||
// Draw the branch lines
|
// Draw the branch lines
|
||||||
|
@ -698,14 +713,12 @@ inline QString DisassemblyWidget::DisassemblyStringFromAddress(u32 address, QFon
|
||||||
const bool isConditionalMet = line.info.conditionMet;
|
const bool isConditionalMet = line.info.conditionMet;
|
||||||
const bool isCurrentPC = m_cpu->getPC() == address;
|
const bool isCurrentPC = m_cpu->getPC() == address;
|
||||||
|
|
||||||
const bool isBreakpoint = CBreakPoints::IsAddressBreakPoint(m_cpu->getCpuType(), address) && !CBreakPoints::IsTempBreakPoint(m_cpu->getCpuType(), address);
|
|
||||||
const std::string addressSymbol = m_cpu->GetSymbolMap().GetLabelString(address);
|
const std::string addressSymbol = m_cpu->GetSymbolMap().GetLabelString(address);
|
||||||
|
|
||||||
const auto demangler = demangler::CDemangler::createGcc();
|
const auto demangler = demangler::CDemangler::createGcc();
|
||||||
|
|
||||||
QString lineString("%1 %2 %3 %4 %5 %6");
|
QString lineString(" %1 %2 %3 %4 %5");
|
||||||
|
|
||||||
lineString = lineString.arg(isBreakpoint ? "\u25A0" : " "); // Bp block ( ■ )
|
|
||||||
if (addressSymbol.empty()) // The address wont have symbol text if it's the start of a function for example
|
if (addressSymbol.empty()) // The address wont have symbol text if it's the start of a function for example
|
||||||
lineString = lineString.arg(address, 8, 16, QChar('0')).toUpper();
|
lineString = lineString.arg(address, 8, 16, QChar('0')).toUpper();
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue