debugger: only update location when the information gets better

The contents of the "original location" field is sometimes worse than
what we collected otherwise. Use it only if it points to a readable file.

Change-Id: I6c7229ead803e9f7970b8322f29469bfbe350b5d
Reviewed-on: http://codereview.qt.nokia.com/1072
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2011-07-04 14:24:42 +02:00
committed by hjk
parent 7020cdc587
commit 73d3ef0ae6
3 changed files with 12 additions and 6 deletions

View File

@@ -2386,7 +2386,7 @@ void GdbEngine::updateResponse(BreakpointResponse &response, const GdbMi &bkpt)
response.fileName = name;
if (response.fileName.isEmpty())
response.setLocation(originalLocation);
response.updateLocation(originalLocation);
}
QString GdbEngine::breakLocation(const QString &file) const
@@ -2847,7 +2847,7 @@ void GdbEngine::extractDataFromInfoBreak(const QString &output, BreakpointModelI
BreakpointResponse sub;
sub.address = address;
sub.functionName = QString::fromUtf8(function);
sub.setLocation(location);
sub.updateLocation(location);
sub.id = BreakpointResponseId(majorPart, minorPart);
sub.type = response.type;
sub.address = address;
@@ -2868,7 +2868,7 @@ void GdbEngine::extractDataFromInfoBreak(const QString &output, BreakpointModelI
BreakpointResponse sub;
sub.address = address;
sub.functionName = QString::fromUtf8(function);
sub.setLocation(location);
sub.updateLocation(location);
sub.id = BreakpointResponseId(majorPart, minorPart);
sub.type = response.type;
sub.address = address;