forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user