debugger: handle symlinked source files a bit better

This commit is contained in:
hjk
2010-02-05 15:33:40 +01:00
parent 4cba453a1e
commit 42eac3c9a8

View File

@@ -163,6 +163,11 @@ void GdbEngine::handleStackFramePython(const GdbResponse &response)
bp->bpFileName = child.findChild("file").data();
bp->markerLineNumber = bp->bpLineNumber.toInt();
bp->markerFileName = bp->bpFileName;
// Happens with moved/symlinked sources.
if (!bp->fileName.isEmpty()
&& !bp->bpFileName.isEmpty()
&& bp->fileName != bp->bpFileName)
bp->markerFileName = bp->fileName;
} else {
QTC_ASSERT(false, qDebug() << child.toString());
//bp->bpNumber = "<unavailable>";