When using add breakpoint button add it not toggle. (#1953)

This commit is contained in:
karliss 2019-12-20 19:02:27 +02:00 committed by Florian Märkl
parent faf6959278
commit 0b849bc05e
3 changed files with 11 additions and 2 deletions

View File

@ -1736,7 +1736,15 @@ void CutterCore::toggleBreakpoint(RVA addr)
void CutterCore::toggleBreakpoint(QString addr)
{
cmd("dbs " + addr);
cmdRaw("dbs " + addr);
emit instructionChanged(addr.toULongLong());
emit breakpointsChanged();
}
void CutterCore::addBreakpoint(QString addr)
{
cmdRaw("db " + addr);
emit instructionChanged(addr.toULongLong());
emit breakpointsChanged();
}

View File

@ -319,6 +319,7 @@ public:
void stepDebug();
void stepOverDebug();
void stepOutDebug();
void addBreakpoint(QString addr);
void toggleBreakpoint(RVA addr);
void toggleBreakpoint(QString addr);
void delBreakpoint(RVA addr);

View File

@ -203,7 +203,7 @@ void BreakpointWidget::addBreakpointDialog()
if (!bps.isEmpty()) {
QStringList bpList = bps.split(QLatin1Char(' '), QString::SkipEmptyParts);
for (const QString &bp : bpList) {
Core()->toggleBreakpoint(bp);
Core()->addBreakpoint(bp);
}
}
}