forked from qt-creator/qt-creator
Debugger[CDB]: Fix breakpoint location correction in constructors.
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>
This commit is contained in:
committed by
Erik Verbruggen
parent
bd81c93e03
commit
938bcae9d6
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user