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

@@ -31,6 +31,7 @@
#include "debuggeractions.h"
#include "debuggeragents.h"
#include "debuggercore.h"
#include "debuggerengine.h"
#include <utils/qtcassert.h>
@@ -54,7 +55,7 @@ StackHandler::StackHandler()
{
m_currentIndex = 0;
m_canExpand = false;
connect(theDebuggerAction(OperateByInstruction), SIGNAL(triggered()),
connect(debuggerCore()->action(OperateByInstruction), SIGNAL(triggered()),
this, SLOT(resetModel()));
}
@@ -142,7 +143,7 @@ Qt::ItemFlags StackHandler::flags(const QModelIndex &index) const
return QAbstractTableModel::flags(index);
const StackFrame &frame = m_stackFrames.at(index.row());
const bool isValid = (frame.isUsable() && !frame.function.isEmpty())
|| theDebuggerBoolSetting(OperateByInstruction);
|| debuggerCore()->boolSetting(OperateByInstruction);
return isValid ? QAbstractTableModel::flags(index) : Qt::ItemFlags(0);
}