forked from qt-creator/qt-creator
debugger: Refactor breakpoint handling.
The breakpoints are now (fairly) tightly guarded by the BreakpointHandler. Engines and Views are only supposed to refer to them by id. They also have individual states now. The breakpoint data is split into a "user requested" "fixed" part in BreakpointData and the engines' acknowledged data in a new struct BreakpointResponse. TODO: Move m_state and m_engine members to BreakpointResponse. Fix regressions in the marker handling.
This commit is contained in:
@@ -34,8 +34,6 @@
|
||||
#include <QtCore/QMap>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QAction;
|
||||
class QActionGroup;
|
||||
class QSettings;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
@@ -48,34 +46,22 @@ namespace Internal {
|
||||
|
||||
class DebuggerSettings : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT // For tr().
|
||||
public:
|
||||
typedef QMultiMap<QString, int> GdbBinaryToolChainMap;
|
||||
|
||||
explicit DebuggerSettings(QObject *parent = 0);
|
||||
explicit DebuggerSettings(QSettings *setting);
|
||||
~DebuggerSettings();
|
||||
|
||||
GdbBinaryToolChainMap gdbBinaryToolChainMap() const;
|
||||
void setGdbBinaryToolChainMap(const GdbBinaryToolChainMap &map);
|
||||
|
||||
void insertItem(int code, Utils::SavedAction *item);
|
||||
Utils::SavedAction *item(int code) const;
|
||||
|
||||
QString dump() const;
|
||||
|
||||
static DebuggerSettings *instance();
|
||||
|
||||
public slots:
|
||||
void readSettings(const QSettings *settings);
|
||||
void writeSettings(QSettings *settings) const;
|
||||
void readSettings();
|
||||
void writeSettings() const;
|
||||
|
||||
private:
|
||||
void readGdbBinarySettings(const QSettings *settings);
|
||||
void writeGdbBinarySettings(QSettings *settings) const;
|
||||
|
||||
QHash<int, Utils::SavedAction *> m_items;
|
||||
GdbBinaryToolChainMap m_gdbBinaryToolChainMap;
|
||||
bool m_gdbBinariesChanged;
|
||||
QSettings *m_settings;
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
@@ -147,13 +133,6 @@ enum DebuggerActionCode
|
||||
BreakOnCatch
|
||||
};
|
||||
|
||||
// singleton access
|
||||
Utils::SavedAction *theDebuggerAction(int code);
|
||||
|
||||
// convenience
|
||||
bool theDebuggerBoolSetting(int code);
|
||||
QString theDebuggerStringSetting(int code);
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
|
||||
Reference in New Issue
Block a user