OSDN Git Service

Debugger[CDB]: Fix breakpoint location correction in constructors.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Mon, 25 Jul 2011 13:01:19 +0000 (15:01 +0200)
committerErik Verbruggen <erik.verbruggen@nokia.com>
Mon, 25 Jul 2011 13:04:59 +0000 (15:04 +0200)
Change-Id: I638554936eae2db7ff2f55508d13f1c52c07f17d
Reviewed-on: http://codereview.qt.nokia.com/2114
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
src/libs/cplusplus/findcdbbreakpoint.cpp

index d1e6162..8cc0293 100644 (file)
@@ -89,16 +89,11 @@ bool FindCdbBreakpoint::preVisit(AST *ast)
 
 bool FindCdbBreakpoint::visit(FunctionDefinitionAST *ast)
 {
-    if (ast->ctor_initializer) {
-        foundLine(ast->function_body->firstToken());
-        return false;
-    }
-
     if (ast->function_body) {
         if (CompoundStatementAST *stmt = ast->function_body->asCompoundStatement()) {
             accept(stmt);
             if (!m_breakpointLine)
-                foundLine(stmt->lastToken() - 1);
+                foundLine(ast->function_body->firstToken());
             return false;
         }
     }