OSDN Git Service

debugger: Merge 'fork' and 'vfork' breakpoints
authorhjk <qtc-committer@nokia.com>
Tue, 29 Mar 2011 07:58:21 +0000 (09:58 +0200)
committerhjk <qtc-committer@nokia.com>
Tue, 29 Mar 2011 07:59:19 +0000 (09:59 +0200)
Reviewed-by: Friedemann Kleint
src/plugins/debugger/breakhandler.cpp
src/plugins/debugger/breakpoint.cpp
src/plugins/debugger/breakpoint.h
src/plugins/debugger/breakwindow.cpp
src/plugins/debugger/cdb/cdbengine.cpp
src/plugins/debugger/cdb/cdbparsehelpers.cpp
src/plugins/debugger/gdb/gdbengine.cpp

index aabe0eb..2c1fa88 100644 (file)
@@ -106,8 +106,8 @@ static QString typeToString(BreakpointType type)
             return msgBreakpointAtSpecialFunc("fork");
         case BreakpointAtExec:
             return msgBreakpointAtSpecialFunc("exec");
-        case BreakpointAtVFork:
-            return msgBreakpointAtSpecialFunc("vfork");
+        //case BreakpointAtVFork:
+        //    return msgBreakpointAtSpecialFunc("vfork");
         case BreakpointAtSysCall:
             return msgBreakpointAtSpecialFunc("syscall");
         case BreakpointAtMain:
@@ -512,7 +512,7 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const
                         || data.type == BreakpointAtCatch
                         || data.type == BreakpointAtFork
                         || data.type == BreakpointAtExec
-                        || data.type == BreakpointAtVFork
+                        //|| data.type == BreakpointAtVFork
                         || data.type == BreakpointAtSysCall)
                     return typeToString(data.type);
                 if (data.type == Watchpoint)
index 8a6c69b..d0e60aa 100644 (file)
@@ -107,7 +107,7 @@ QString BreakpointParameters::toString() const
     case BreakpointAtMain:
     case BreakpointAtFork:
     case BreakpointAtExec:
-    case BreakpointAtVFork:
+    //case BreakpointAtVFork:
     case BreakpointAtSysCall:
     case UnknownType:
         break;
index 6c85561..0a0941e 100644 (file)
@@ -61,7 +61,7 @@ enum BreakpointType
     BreakpointAtMain,
     BreakpointAtFork,
     BreakpointAtExec,
-    BreakpointAtVFork,
+    //BreakpointAtVFork,
     BreakpointAtSysCall,
     Watchpoint
 };
index 1ce02e0..3eb357e 100644 (file)
@@ -122,12 +122,16 @@ BreakpointDialog::BreakpointDialog(unsigned engineCapabilities, QWidget *parent)
     // Match BreakpointType (omitting unknown type).
     m_ui.setupUi(this);
     QStringList types;
-    types << tr("File and Line Number") << tr("Function Name") << tr("Address")
-          << tr("throw") << tr("catch")
-          << tr("Function \"main()\"")
-          << tr("fork") << tr("exec")
-          << tr("vfork") << tr("syscall")
-          << tr("Address (Watchpoint)");
+    types << tr("File and Line Number")
+          << tr("Function Name")
+          << tr("Address")
+          << tr("Break when C++ Exception is Thrown")
+          << tr("Break when C++ Exception is Caught")
+          << tr("Break when Function \"main()\" Starts")
+          << tr("Break when a new Process is Forked")
+          << tr("Break when a new Process is Executed")
+          << tr("Break when a System Call is Executed")
+          << tr("Break on Data Access (Watchpoint)");
     QTC_ASSERT(types.size() == Watchpoint, return; )
     m_ui.comboBoxType->addItems(types);
     m_ui.pathChooserFileName->setExpectedKind(Utils::PathChooser::File);
@@ -339,7 +343,7 @@ void BreakpointDialog::typeChanged(int)
     case BreakpointAtMain:
     case BreakpointAtFork:
     case BreakpointAtExec:
-    case BreakpointAtVFork:
+    //case BreakpointAtVFork:
     case BreakpointAtSysCall:
         break;
     case BreakpointByAddress:
@@ -366,7 +370,7 @@ void BreakpointDialog::typeChanged(int)
     case BreakpointAtCatch:
     case BreakpointAtFork:
     case BreakpointAtExec:
-    case BreakpointAtVFork:
+    //case BreakpointAtVFork:
     case BreakpointAtSysCall:
         clearOtherParts(AllConditionParts|ModulePart|TracePointPart);
         setPartsEnabled(AllConditionParts|TracePointPart);
index 949bed5..a36300f 100644 (file)
@@ -2283,7 +2283,7 @@ bool CdbEngine::acceptsBreakpoint(BreakpointId id) const
     switch (data.type) {
     case UnknownType:
     case BreakpointAtFork:
-    case BreakpointAtVFork:
+    //case BreakpointAtVFork:
     case BreakpointAtSysCall:
         return false;
     case Watchpoint:
index 736ea51..446e50a 100644 (file)
@@ -102,7 +102,7 @@ static BreakpointParameters fixWinMSVCBreakpoint(const BreakpointParameters &p)
     case BreakpointByFunction:
     case BreakpointByAddress:
     case BreakpointAtFork:
-    case BreakpointAtVFork:
+    //case BreakpointAtVFork:
     case BreakpointAtSysCall:
     case Watchpoint:
         break;
@@ -144,7 +144,8 @@ QByteArray cdbAddBreakpointCommand(const BreakpointParameters &bpIn,
         str << '~' << bp.threadSpec << ' ';
 
     // Currently use 'bu' so that the offset expression (including file name)
-    // is kept when reporting back breakpoints (which is otherwise discarded when resolving).
+    // is kept when reporting back breakpoints (which is otherwise discarded
+    // when resolving).
     str << (bp.type == Watchpoint ? "ba" : "bu");
     if (id != BreakpointId(-1))
         str << id;
@@ -154,7 +155,7 @@ QByteArray cdbAddBreakpointCommand(const BreakpointParameters &bpIn,
     switch (bp.type) {
     case BreakpointAtFork:
     case BreakpointAtExec:
-    case BreakpointAtVFork:
+    //case BreakpointAtVFork:
     case BreakpointAtSysCall:
     case UnknownType:
     case BreakpointAtCatch:
index 9fad46f..0180c3e 100644 (file)
@@ -2685,13 +2685,15 @@ void GdbEngine::insertBreakpoint(BreakpointId id)
     if (type == BreakpointAtFork) {
         postCommand("catch fork", NeedsStop | RebuildBreakpointModel,
             CB(handleCatchInsert), id);
-        return;
-    }
-    if (type == BreakpointAtVFork) {
         postCommand("catch vfork", NeedsStop | RebuildBreakpointModel,
             CB(handleCatchInsert), id);
         return;
     }
+    //if (type == BreakpointAtVFork) {
+    //    postCommand("catch vfork", NeedsStop | RebuildBreakpointModel,
+    //        CB(handleCatchInsert), id);
+    //    return;
+    //}
     if (type == BreakpointAtExec) {
         postCommand("catch exec", NeedsStop | RebuildBreakpointModel,
             CB(handleCatchInsert), id);