forked from qt-creator/qt-creator
Debugger: Don't use document with AST from indexing snapshot
...since the AST will be released at some point from another thread. Change-Id: I71d20228ebec71e98dca3474452677ec63ffe4c6 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
committed by
Erik Verbruggen
parent
82325d1046
commit
d4e49c088a
@@ -2828,10 +2828,7 @@ static CPlusPlus::Document::Ptr getParsedDocument(const QString &fileName,
|
|||||||
unsigned BreakpointCorrectionContext::fixLineNumber(const QString &fileName,
|
unsigned BreakpointCorrectionContext::fixLineNumber(const QString &fileName,
|
||||||
unsigned lineNumber) const
|
unsigned lineNumber) const
|
||||||
{
|
{
|
||||||
CPlusPlus::Document::Ptr doc = m_snapshot.document(fileName);
|
const CPlusPlus::Document::Ptr doc = getParsedDocument(fileName, m_workingCopy, m_snapshot);
|
||||||
if (!doc || !doc->translationUnit()->ast())
|
|
||||||
doc = getParsedDocument(fileName, m_workingCopy, m_snapshot);
|
|
||||||
|
|
||||||
CPlusPlus::FindCdbBreakpoint findVisitor(doc->translationUnit());
|
CPlusPlus::FindCdbBreakpoint findVisitor(doc->translationUnit());
|
||||||
const unsigned correctedLine = findVisitor(lineNumber);
|
const unsigned correctedLine = findVisitor(lineNumber);
|
||||||
if (!correctedLine) {
|
if (!correctedLine) {
|
||||||
|
|||||||
Reference in New Issue
Block a user