From e612e6636b42c24aa2e6b31317b4b49d4416c10e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 2 Feb 2011 14:41:14 +0100 Subject: Debugger: Add a module to breakpoint. To speed up CDB, lldb. Add to dialogs, serialize. Move breakpoint.ui into Debugger::Internal, add buddies. Rubber-stamped-by: hjk --- src/plugins/debugger/breakhandler.cpp | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) (limited to 'src/plugins/debugger/breakhandler.cpp') diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 3ef79dc775..8cdfc1d3b0 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -241,6 +241,7 @@ bool BreakHandler::hasWatchpointAt(quint64 address) const void BreakHandler::saveBreakpoints() { + const QString one = _("1"); //qDebug() << "SAVING BREAKPOINTS..."; QTC_ASSERT(debuggerCore(), return); QList list; @@ -268,11 +269,13 @@ void BreakHandler::saveBreakpoints() if (data.threadSpec >= 0) map.insert(_("threadspec"), data.threadSpec); if (!data.enabled) - map.insert(_("disabled"), _("1")); + map.insert(_("disabled"), one); if (data.useFullPath) - map.insert(_("usefullpath"), _("1")); + map.insert(_("usefullpath"), one); if (data.tracepoint) - map.insert(_("tracepoint"), _("1")); + map.insert(_("tracepoint"), one); + if (!data.module.isEmpty()) + map.insert(_("module"), data.module); list.append(map); } debuggerCore()->setSessionValue("Breakpoints", list); @@ -322,6 +325,9 @@ void BreakHandler::loadBreakpoints() v = map.value(_("type")); if (v.isValid() && v.toInt() != UnknownType) data.type = BreakpointType(v.toInt()); + v = map.value(_("module")); + if (v.isValid()) + data.module = v.toString(); appendBreakpoint(data); } //qDebug() << "LOADED BREAKPOINTS" << this << list.size(); @@ -1163,12 +1169,15 @@ QString BreakHandler::BreakpointItem::toToolTip() const << "" << tr("Requested") << "" << tr("Obtained") << "" << "" << tr("Internal Number:") - << "—" << response.number << "" - << "" << tr("Function Name:") + << "—" << response.number << ""; + if (data.type == BreakpointByFunction) { + str << "" << tr("Function Name:") << "" << data.functionName << "" << response.functionName - << "" - << "" << tr("File Name:") + << ""; + } + if (data.type == BreakpointByFileAndLine) { + str << "" << tr("File Name:") << "" << QDir::toNativeSeparators(data.fileName) << "" << QDir::toNativeSeparators(response.fileName) << "" @@ -1177,8 +1186,15 @@ QString BreakHandler::BreakpointItem::toToolTip() const << "" << response.lineNumber << "" << "" << tr("Corrected Line Number:") << "-" - << "" << response.correctedLineNumber << "" - << "" << tr("Breakpoint Address:") + << "" << response.correctedLineNumber << ""; + } + if (data.type == BreakpointByFunction || data.type == BreakpointByFileAndLine) { + str << "" << tr("Module:") + << "" << data.module + << "" << response.module + << ""; + } + str << "" << tr("Breakpoint Address:") << ""; formatAddress(str, data.address); str << ""; -- cgit v1.2.1