forked from qt-creator/qt-creator
debugger: move isCppBreakpoint to Breakpoint
Change-Id: I241401fa010166982e5a95a699c99fbaa87188ef Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -276,6 +276,21 @@ void BreakpointParameters::updateLocation(const QByteArray &location)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool BreakpointParameters::isCppBreakpoint() const
|
||||||
|
{
|
||||||
|
// Qml specific breakpoint types.
|
||||||
|
if (type == BreakpointAtJavaScriptThrow
|
||||||
|
|| type == BreakpointOnQmlSignalHandler)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Qml is currently only file.
|
||||||
|
if (type == BreakpointByFileAndLine)
|
||||||
|
return !fileName.endsWith(QLatin1String(".qml"), Qt::CaseInsensitive)
|
||||||
|
&& !fileName.endsWith(QLatin1String(".js"), Qt::CaseInsensitive);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
QString BreakpointParameters::toString() const
|
QString BreakpointParameters::toString() const
|
||||||
{
|
{
|
||||||
QString result;
|
QString result;
|
||||||
|
|||||||
@@ -211,6 +211,7 @@ public:
|
|||||||
// Enough for now.
|
// Enough for now.
|
||||||
bool isBreakpoint() const { return !isWatchpoint() && !isTracepoint(); }
|
bool isBreakpoint() const { return !isWatchpoint() && !isTracepoint(); }
|
||||||
bool isTracepoint() const { return tracepoint; }
|
bool isTracepoint() const { return tracepoint; }
|
||||||
|
bool isCppBreakpoint() const;
|
||||||
QString toString() const;
|
QString toString() const;
|
||||||
void updateLocation(const QByteArray &location); // file.cpp:42
|
void updateLocation(const QByteArray &location); // file.cpp:42
|
||||||
|
|
||||||
|
|||||||
@@ -2542,7 +2542,7 @@ bool CdbEngine::stateAcceptsBreakpointChanges() const
|
|||||||
bool CdbEngine::acceptsBreakpoint(BreakpointModelId id) const
|
bool CdbEngine::acceptsBreakpoint(BreakpointModelId id) const
|
||||||
{
|
{
|
||||||
const BreakpointParameters &data = breakHandler()->breakpointData(id);
|
const BreakpointParameters &data = breakHandler()->breakpointData(id);
|
||||||
if (!DebuggerEngine::isCppBreakpoint(data))
|
if (!data.isCppBreakpoint())
|
||||||
return false;
|
return false;
|
||||||
switch (data.type) {
|
switch (data.type) {
|
||||||
case UnknownType:
|
case UnknownType:
|
||||||
|
|||||||
@@ -1634,20 +1634,6 @@ void DebuggerEngine::showStoppedByExceptionMessageBox(const QString &description
|
|||||||
showMessageBox(QMessageBox::Information, tr("Exception Triggered"), msg);
|
showMessageBox(QMessageBox::Information, tr("Exception Triggered"), msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DebuggerEngine::isCppBreakpoint(const BreakpointParameters &p)
|
|
||||||
{
|
|
||||||
//Qml specific breakpoint types
|
|
||||||
if (p.type == BreakpointAtJavaScriptThrow
|
|
||||||
|| p.type == BreakpointOnQmlSignalHandler)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Qml is currently only file
|
|
||||||
if (p.type != BreakpointByFileAndLine)
|
|
||||||
return true;
|
|
||||||
return !p.fileName.endsWith(QLatin1String(".qml"), Qt::CaseInsensitive)
|
|
||||||
&& !p.fileName.endsWith(QLatin1String(".js"), Qt::CaseInsensitive);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DebuggerEngine::openMemoryView(quint64 startAddr, unsigned flags,
|
void DebuggerEngine::openMemoryView(quint64 startAddr, unsigned flags,
|
||||||
const QList<MemoryMarkup> &ml, const QPoint &pos,
|
const QList<MemoryMarkup> &ml, const QPoint &pos,
|
||||||
const QString &title, QWidget *parent)
|
const QString &title, QWidget *parent)
|
||||||
|
|||||||
@@ -383,8 +383,6 @@ protected:
|
|||||||
void showStoppedBySignalMessageBox(const QString meaning, QString name);
|
void showStoppedBySignalMessageBox(const QString meaning, QString name);
|
||||||
void showStoppedByExceptionMessageBox(const QString &description);
|
void showStoppedByExceptionMessageBox(const QString &description);
|
||||||
|
|
||||||
static bool isCppBreakpoint(const Internal::BreakpointParameters &p);
|
|
||||||
|
|
||||||
bool isStateDebugging() const;
|
bool isStateDebugging() const;
|
||||||
void setStateDebugging(bool on);
|
void setStateDebugging(bool on);
|
||||||
|
|
||||||
|
|||||||
@@ -2932,7 +2932,7 @@ bool GdbEngine::stateAcceptsBreakpointChanges() const
|
|||||||
|
|
||||||
bool GdbEngine::acceptsBreakpoint(BreakpointModelId id) const
|
bool GdbEngine::acceptsBreakpoint(BreakpointModelId id) const
|
||||||
{
|
{
|
||||||
return DebuggerEngine::isCppBreakpoint(breakHandler()->breakpointData(id))
|
return breakHandler()->breakpointData(id).isCppBreakpoint()
|
||||||
&& startParameters().startMode != AttachCore;
|
&& startParameters().startMode != AttachCore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -674,7 +674,7 @@ void QmlEngine::attemptBreakpointSynchronization()
|
|||||||
|
|
||||||
bool QmlEngine::acceptsBreakpoint(BreakpointModelId id) const
|
bool QmlEngine::acceptsBreakpoint(BreakpointModelId id) const
|
||||||
{
|
{
|
||||||
if (!DebuggerEngine::isCppBreakpoint(breakHandler()->breakpointData(id)))
|
if (!breakHandler()->breakpointData(id).isCppBreakpoint())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
//If it is a Cpp Breakpoint query if the type can be also handled by the debugger client
|
//If it is a Cpp Breakpoint query if the type can be also handled by the debugger client
|
||||||
|
|||||||
Reference in New Issue
Block a user