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:
hjk
2010-11-10 16:33:11 +01:00
parent 33bae0d784
commit 8ae541b36f
56 changed files with 2245 additions and 2057 deletions

View File

@@ -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