From 6bcb4dbd5e6c56283cf9bb93fd5cfffc16d394b8 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 11 May 2011 15:51:35 +0200 Subject: [PATCH] debugger: fix display of breakpoints --- src/plugins/debugger/gdb/gdbengine.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 701806e0e6b..cda8e976faf 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -2198,6 +2198,8 @@ void GdbEngine::updateBreakpointDataFromOutput(BreakpointId id, const GdbMi &bkp // fields named "addr" in the response and/or the address // is called . //qDebug() << "ADDR: " << child.data() << (child.data() == ""); + if (child.data() == "") + response.multiple = true; if (child.data().startsWith("0x")) { response.address = child.toAddress(); } else { @@ -2380,8 +2382,13 @@ void GdbEngine::handleBreakInsert1(const GdbResponse &response) changeBreakpoint(id); } else { handler->notifyBreakpointInsertOk(id); - attemptAdjustBreakpointLocation(id); } + BreakpointResponse bresponse = handler->response(id); + if (bresponse.correctedLineNumber == 0) + attemptAdjustBreakpointLocation(id); + if (bresponse.multiple && bresponse.addresses.isEmpty()) + postCommand("info break " + QByteArray::number(bresponse.number), + NeedsStop, CB(handleBreakListMultiple), QVariant(id)); } else if (response.data.findChild("msg").data().contains("Unknown option")) { // Older version of gdb don't know the -a option to set tracepoints // ^error,msg="mi_cmd_break_insert: Unknown option ``a''"