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

@@ -38,6 +38,7 @@
#include "gdb/gdbengine.h"
#include "gdb/remotegdbserveradapter.h"
#include "gdb/remoteplaingdbadapter.h"
#include "gdb/gdboptionspage.h"
#include "qml/qmlengine.h"
#include "qml/qmlcppengine.h"
#include "lldb/lldbenginehost.h"
@@ -76,7 +77,7 @@ DebuggerEngine *createQmlEngine(const DebuggerStartParameters &);
DebuggerEngine *createQmlCppEngine(const DebuggerStartParameters &);
DebuggerEngine *createLLDBEngine(const DebuggerStartParameters &);
bool checkGdbConfiguration(int toolChain, QString *errorMsg, QString *settingsPage);
extern QString msgNoBinaryForToolChain(int tc);
// FIXME: Outdated?
// The createCdbEngine function takes a list of options pages it can add to.
@@ -552,9 +553,14 @@ bool DebuggerRunControl::checkDebugConfiguration(int toolChain,
case ProjectExplorer::ToolChain_GCCE:
case ProjectExplorer::ToolChain_RVCT_ARMV5:
case ProjectExplorer::ToolChain_RVCT_ARMV6:
success = checkGdbConfiguration(toolChain, errorMessage, settingsPage);
if (!success)
if (debuggerCore()->gdbBinaryForToolChain(toolChain).isEmpty()) {
*errorMessage = msgNoBinaryForToolChain(toolChain);
*settingsPage = GdbOptionsPage::settingsId();
*errorMessage += msgEngineNotAvailable("Gdb");
success = false;
} else {
success = true;
}
break;
case ProjectExplorer::ToolChain_MSVC:
success = checkCdbConfiguration(toolChain, errorMessage, settingsPage);