Commit 7c823c6a authored by hjk's avatar hjk
Browse files

debugger: prevent overwriting a correctly parsed file name for breakpoints.

parent 42c66a8b
...@@ -1972,10 +1972,11 @@ void GdbEngine::breakpointDataFromOutput(BreakpointData *data, const GdbMi &bkpt ...@@ -1972,10 +1972,11 @@ void GdbEngine::breakpointDataFromOutput(BreakpointData *data, const GdbMi &bkpt
data->markerFileName = name; data->markerFileName = name;
} else { } else {
name = QFile::decodeName(file); name = QFile::decodeName(file);
// Use fullName() once we have a mapping which is more complete than gdb's own ... // Use fullName() once we have a mapping which is more complete than
// No point in assigning markerFileName for now. // gdb's own. No point in assigning markerFileName for now.
} }
data->bpFileName = name; if (!name.isEmpty())
data->bpFileName = name;
} }
QString GdbEngine::breakLocation(const QString &file) const QString GdbEngine::breakLocation(const QString &file) const
...@@ -2204,10 +2205,11 @@ void GdbEngine::handleBreakInfo(const GdbResponse &response) ...@@ -2204,10 +2205,11 @@ void GdbEngine::handleBreakInfo(const GdbResponse &response)
BreakHandler *handler = manager()->breakHandler(); BreakHandler *handler = manager()->breakHandler();
if (response.resultClass == GdbResultDone) { if (response.resultClass == GdbResultDone) {
// Old-style output for multiple breakpoints, presumably in a // Old-style output for multiple breakpoints, presumably in a
// constructor // constructor.
int found = handler->findBreakpoint(bpNumber); int found = handler->findBreakpoint(bpNumber);
if (found != -1) { if (found != -1) {
QString str = QString::fromLocal8Bit(response.data.findChild("consolestreamoutput").data()); QString str = QString::fromLocal8Bit(
response.data.findChild("consolestreamoutput").data());
extractDataFromInfoBreak(str, handler->at(found)); extractDataFromInfoBreak(str, handler->at(found));
attemptBreakpointSynchronization(); // trigger "ready" attemptBreakpointSynchronization(); // trigger "ready"
} }
...@@ -2308,8 +2310,8 @@ void GdbEngine::attemptBreakpointSynchronization() ...@@ -2308,8 +2310,8 @@ void GdbEngine::attemptBreakpointSynchronization()
for (int index = 0; index != handler->size(); ++index) { for (int index = 0; index != handler->size(); ++index) {
BreakpointData *data = handler->at(index); BreakpointData *data = handler->at(index);
if (data->bpNumber.isEmpty()) { // unset breakpoint? if (data->bpNumber.isEmpty()) { // Unset breakpoint?
data->bpNumber = " "; // Sent, but no feedback yet data->bpNumber = " "; // Sent, but no feedback yet.
sendInsertBreakpoint(index); sendInsertBreakpoint(index);
} else if (data->bpNumber.toInt()) { } else if (data->bpNumber.toInt()) {
if (data->bpMultiple && data->bpFileName.isEmpty()) { if (data->bpMultiple && data->bpFileName.isEmpty()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment