Summary: | Correctly support multiple location breakpoints | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | David <daviddoria> |
Component: | CPP Debugger | Assignee: | Niko Sams <niko.sams> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | david.narvaez, niko.sams, ralf.denzer |
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | 4.3.0 | ||
Platform: | unspecified | ||
OS: | Linux | ||
URL: | http://sourceware.org/bugzilla/show_bug.cgi?id=9659 | ||
Latest Commit: | http://commits.kde.org/kdevelop/b1ac35e3a0db0f06db9aac6061cbbecbfbcfe93a | Version Fixed In: |
Description
David
2012-08-07 14:21:44 UTC
upstream bug: http://sourceware.org/bugzilla/show_bug.cgi?id=9659 I'll make our parser less strict as was suggested to me by ap| in #gdb on freenode irc. Git commit c09d99cf0932e98008e2375a74df5da6d4df2a97 by Milian Wolff. Committed on 07/08/2012 at 17:40. Pushed by mwolff into branch '4.4'. Be less strict about named and unnamed arguments. Recent GDB versions can report multiple breakpoints but do so using an invalid MI format, see e.g. the upstream bug report: http://sourceware.org/bugzilla/show_bug.cgi?id=9659 Since we cannot expect GDB to be fixed anytime soon, just make our parser less strict. This was actually the recommendation in #gdb on freenode IRC as well... M +13 -7 debuggers/gdb/mi/miparser.cpp M +30 -0 debuggers/gdb/unittests/gdbtest.cpp M +1 -0 debuggers/gdb/unittests/gdbtest.h http://commits.kde.org/kdevelop/c09d99cf0932e98008e2375a74df5da6d4df2a97 The debugger does run now, but I got a popup window "Internal debugger error" - and it says "The debugger component encountered internal error while processing reply from gdb. Please submit a bug report." an excerpt from the output looks interesting: func="PatchMatch, 2u> >::Propagation(AllowedPropagationNeighbors)" looks interesting it seems as though something is cut off at the beginning? A full output is: The exception is: MI type error The MI response is: ^done,BreakpointTable={nr_rows="12",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="",times="1",original-location="/media/portable/Projects/BDSInpainting/PatchMatch/PatchMatch.hpp:273"},{number="1.1",enabled="y",addr="0x081da4d5",func="PatchMatch, 2u> >::Propagation, 2u> >::ForwardPropagation()::{lambda(itk::Index const&)#1}>(ForwardPropagationNeighbors, PatchMatch, 2u> >::ForwardPropagation()::{lambda(itk::Index const&)#1}, AcceptanceTest*)",file="/media/portable/Projects/BDSInpainting/Drivers/../PatchMatch/PatchMatch.hpp",fullname="/media/portable/Projects/BDSInpainting/PatchMatch/PatchMatch.hpp",line="273"},{number="1.2",enabled="y",addr="0x081daca5",func="PatchMatch, 2u> >::Propagation, 2u> >::BackwardPropagation()::{lambda(itk::Index const&)#1}>(BackwardPropagationNeighbors, PatchMatch, 2u> >::BackwardPropagation()::{lambda(itk::Index const&)#1}, AcceptanceTest*)",file="/media/portable/Projects/BDSInpainting/Drivers/../PatchMatch/PatchMatch.hpp",fullname="/media/portable/Projects/BDSInpainting/PatchMatch/PatchMatch.hpp",line="273"},{number="1.3",enabled="y",addr="0x081db475",func="PatchMatch, 2u> >::Propagation, 2u> >::InwardPropagation()::{lambda(itk::Index const&)#1}>(AllowedPropagationNeighbors, PatchMatch, 2u> >::InwardPropagation()::{lambda(itk::Index const&)#1}, AcceptanceTest*)",file="/media/portable/Projects/BDSInpainting/Drivers/../PatchMatch/PatchMatch.hpp",fullname="/media/portable/Projects/BDSInpainting/PatchMatch/PatchMatch.hpp",line="273"},{number="1.4",enabled="y",addr="0x081dbf2d",func="PatchMatch, 2u> >::Propagation, 2u> >::ForcePropagation()::{lambda(itk::Index const&)#1}>(AllNeighbors, PatchMatch, 2u> >::ForcePropagation()::{lambda(itk::Index const&)#1}, AcceptanceTest*)",file="/media/portable/Projects/BDSInpainting/Drivers/../PatchMatch/PatchMatch.hpp",fullname="/media/portable/Projects/BDSInpainting/PatchMatch/PatchMatch.hpp",line="273"},bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="",times="0",original-location="/media/portable/Projects/BDSInpainting/PatchMatch/PatchMatch.hpp:355"},{number="2.1",enabled="y",addr="0x081da853",func="PatchMatch, 2u> >::Propagation, 2u> >::ForwardPropagation()::{lambda(itk::Index const&)#1}>(ForwardPropagationNeighbors, PatchMatch, 2u> >::ForwardPropagation()::{lambda(itk::Index const&)#1}, AcceptanceTest*)",file="/media/portable/Projects/BDSInpainting/Drivers/../PatchMatch/PatchMatch.hpp",fullname="/media/portable/Projects/BDSInpainting/PatchMatch/PatchMatch.hpp",line="355"},{number="2.2",enabled="y",addr="0x081db023",func="PatchMatch, 2u> >::Propagation, 2u> >::BackwardPropagation()::{lambda(itk::Index const&)#1}>(BackwardPropagationNeighbors, PatchMatch, 2u> >::BackwardPropagation()::{lambda(itk::Index const&)#1}, AcceptanceTest*)",file="/media/portable/Projects/BDSInpainting/Drivers/../PatchMatch/PatchMatch.hpp",fullname="/media/portable/Projects/BDSInpainting/PatchMatch/PatchMatch.hpp",line="355"},{number="2.3",enabled="y",addr="0x081db7f3",func="PatchMatch, 2u> >::Propagation, 2u> >::InwardPropagation()::{lambda(itk::Index const&)#1}>(AllowedPropagationNeighbors, PatchMatch, 2u> >::InwardPropagation()::{lambda(itk::Index const&)#1}, AcceptanceTest*)",file="/media/portable/Projects/BDSInpainting/Drivers/../PatchMatch/PatchMatch.hpp",fullname="/media/portable/Projects/BDSInpainting/PatchMatch/PatchMatch.hpp",line="355"},{number="2.4",enabled="y",addr="0x081dc2ab",func="PatchMatch, 2u> >::Propagation, 2u> >::ForcePropagation()::{lambda(itk::Index const&)#1}>(AllNeighbors, PatchMatch, 2u> >::ForcePropagation()::{lambda(itk::Index const&)#1}, AcceptanceTest*)",file="/media/portable/Projects/BDSInpainting/Drivers/../PatchMatch/PatchMatch.hpp",fullname="/media/portable/Projects/BDSInpainting/PatchMatch/PatchMatch.hpp",line="355"},bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x081d267a",func="PatchMatch, 2u> >::ForcePropagation()",file="/media/portable/Projects/BDSInpainting/Drivers/../PatchMatch/PatchMatch.hpp",fullname="/media/portable/Projects/BDSInpainting/PatchMatch/PatchMatch.hpp",line="241",times="0",original-location="/media/portable/Projects/BDSInpainting/PatchMatch/PatchMatch.hpp:241"},bkpt={number="4",type="breakpoint",disp="keep",enabled="y",addr="0x081c71a8",func="BDSInpaintingRings, 2u> >::Inpaint()",file="/media/portable/Projects/BDSInpainting/Drivers/../BDSInpaintingRings.hpp",fullname="/media/portable/Projects/BDSInpainting/BDSInpaintingRings.hpp",line="125",times="0",original-location="/media/portable/Projects/BDSInpainting/BDSInpaintingRings.hpp:125"},bkpt={number="5",type="breakpoint",disp="keep",enabled="y",addr="",pending="\"/home/doriad/Test/Test.cpp\":10",times="0",original-location="\"/home/doriad/Test/Test.cpp\":10"},bkpt={number="6",type="breakpoint",disp="keep",enabled="y",addr="",pending="\"/home/doriad/Test/Test.cpp\":20",times="0",original-location="\"/home/doriad/Test/Test.cpp\":20"},bkpt={number="7",type="breakpoint",disp="keep",enabled="y",addr="",pending="\"/media/portable/Examples/c++/Array/Array.cpp\":7",times="0",original-location="\"/media/portable/Examples/c++/Array/Array.cpp\":7"},bkpt={number="8",type="breakpoint",disp="keep",enabled="y",addr="",pending="\"/media/portable/Projects/BDSInpainting/PatchMatch/PatchMatchRings.hpp\":113",times="0",original-location="\"/media/portable/Projects/BDSInpainting/PatchMatch/PatchMatchRings.hpp\":113"},bkpt={number="9",type="breakpoint",disp="keep",enabled="y",addr="",pending="\"/media/portable/Projects/BDSInpainting/BDSInpaintingDemo.cpp\":111",times="0",original-location="\"/media/portable/Projects/BDSInpainting/BDSInpaintingDemo.cpp\":111"},bkpt={number="10",type="breakpoint",disp="keep",enabled="y",addr="",pending="\"/media/portable/Projects/BDSInpainting/BDSInpaintingDemo.cpp\":146",times="0",original-location="\"/media/portable/Projects/BDSInpainting/BDSInpaintingDemo.cpp\":146"},bkpt={number="11",type="breakpoint",disp="keep",enabled="y",addr="",pending="\"/media/portable/Projects/PatchMatch/PatchMatch.hpp\":294",times="0",original-location="\"/media/portable/Projects/PatchMatch/PatchMatch.hpp\":294"},bkpt={number="12",type="breakpoint",disp="keep",enabled="y",addr="",pending="\"/media/portable/Projects/PatchMatch/Drivers/PatchMatch.cpp\":106",times="0",original-location="\"/media/portable/Projects/PatchMatch/Drivers/PatchMatch.cpp\":106"}]} Could you provide and reduced example that shows your issue? Best would be a single file that we can simply compile and debug. *** Bug 303675 has been marked as a duplicate of this bug. *** Ok, I found a way to reproduce your issue. It is caused by breakpoints that have multiple locations. That happens for example when setting a breakpoint on a function that has multiple overloads; or for inlined functions (that exist on multiple addresses) Git commit b1ac35e3a0db0f06db9aac6061cbbecbfbcfe93a by Niko Sams. Committed on 26/08/2012 at 19:28. Pushed by nsams into branch '4.4'. support multiple location breakpoints - turn breakpoint numbers/ids into QString (as they can be "1.1") M +37 -26 debuggers/gdb/breakpointcontroller.cpp M +1 -1 debuggers/gdb/breakpointcontroller.h M +2 -0 debuggers/gdb/unittests/CMakeLists.txt M +22 -0 debuggers/gdb/unittests/gdbtest.cpp M +1 -0 debuggers/gdb/unittests/gdbtest.h http://commits.kde.org/kdevelop/b1ac35e3a0db0f06db9aac6061cbbecbfbcfe93a Additional Info: apparently this multiple locations feature already exists for some time: http://vladimir_prus.blogspot.co.at/2007/11/breakpoints-in-constructors.html Yes, see the URL of this bug to see additional places where this happens. |