Bug 303675

Summary: internal debugger error at break point and step over
Product: kdevelop Reporter: ralf.denzer
Component: CPP DebuggerAssignee: kdevelop-bugs-null
Status: RESOLVED DUPLICATE    
Severity: normal CC: niko.sams
Priority: NOR    
Version: 4.3.1   
Target Milestone: 4.3.0   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:

Description ralf.denzer 2012-07-17 11:53:24 UTC
Hello, 
while debugging my c++ program I'm getting at each break point and always while using 
"Step Over" etc. a window with title "internal debugger error - kdevelop" with a typical content (Details)

The exception is: MI type error The MI response is: ^done,BreakpointTable={nr_rows="1",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="18",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="\"/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h\":64"},{number="1.1",enabled="y",addr="0x00007ffff6f14fb0",func="arctic::ElTy01PC144::constModelInitsElement(arctic::Group&)",file="/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h",fullname="/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h",line="64"},{number="1.2",enabled="y",addr="0x00007ffff6f16426",func="arctic::ElTy01PC144::constModelInitsElement(arctic::Group&)",file="/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h",fullname="/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h",line="64"}]}

If I debug a simple c++ program (like e.g. "Hello world") I don't get such messages in a window.

Strangely, the debugger works, variables are getting displayed correct, "step over", "step into" etc. works but I get for every "step ????" a new window with an internal error message. Which is quite annoying. 
I see this bug also in the current git master version.

If I activate "show internal commands" in the gdb-window I see the following output 

gdb --interpreter=mi2 -quiet
(gdb) -gdb-show version
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
^done
(gdb) -gdb-set width 0
^done
(gdb) -gdb-set height 0
^done
(gdb) handle SIG32 pass nostop noprint
handle SIG32 pass nostop noprint
Signal Stop Print Pass to program Description
SIG32 No No Yes Real-time event 32
^done
(gdb) handle SIG41 pass nostop noprint
handle SIG41 pass nostop noprint
Signal Stop Print Pass to program Description
SIG41 No No Yes Real-time event 41
^done
(gdb) handle SIG42 pass nostop noprint
handle SIG42 pass nostop noprint
Signal Stop Print Pass to program Description
SIG42 No No Yes Real-time event 42
^done
(gdb) handle SIG43 pass nostop noprint
handle SIG43 pass nostop noprint
Signal Stop Print Pass to program Description
SIG43 No No Yes Real-time event 43
^done
(gdb) -enable-pretty-printing
^done
(gdb) -gdb-set charset UTF-8
^done
(gdb) -gdb-set print sevenbit-strings off
^done
(gdb) source /home/denzer/local/kdevelop4/share/apps/kdevgdb/printers/gdbinit
source /home/denzer/local/kdevelop4/share/apps/kdevgdb/printers/gdbinit
^done
(gdb) -inferior-tty-set /dev/pts/6
^done
(gdb) -environment-cd /home/denzer/projects/arctic/debug-build
^done
(gdb) -gdb-set print static-members off
^done
(gdb) -gdb-set print asm-demangle on
^done
(gdb) -file-exec-and-symbols /home/denzer/projects/arctic/debug-build/arctic
^done
(gdb) -break-list
^done,BreakpointTable={nr_rows="0",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=[]}
(gdb) -break-insert -f "\"/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h\":64"
No source file named /home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h.
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="\"/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h\":64",times="0",original-location="\"/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h\":64"}
(gdb) -exec-run
=thread-group-started,id="i1",pid="15909"
=thread-created,id="1",group-id="i1"
^running
*running,thread-id="all"
=library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/home/denzer/projects/arctic/debug-build/Base/libBase.so.4",target-name="/home/denzer/projects/arctic/debug-build/Base/libBase.so.4",host-name="/home/denzer/projects/arctic/debug-build/Base/libBase.so.4",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/home/denzer/projects/arctic/debug-build/ElementType/libElementType.so.4",target-name="/home/denzer/projects/arctic/debug-build/ElementType/libElementType.so.4",host-name="/home/denzer/projects/arctic/debug-build/ElementType/libElementType.so.4",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/home/denzer/projects/arctic/debug-build/ElementType/ElTy01PC/ConstModel/libConstModelElTy01PC.so.4",target-name="/home/denzer/projects/arctic/debug-build/ElementType/ElTy01PC/ConstModel/libConstModelElTy01PC.so.4",host-name="/home/denzer/projects/arctic/debug-build/ElementType/ElTy01PC/ConstModel/libConstModelElTy01PC.so.4",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/home/denzer/projects/arctic/debug-build/ElementType/ElTy11PC/ConstModel/libConstModelElTy11PC.so.4",target-name="/home/denzer/projects/arctic/debug-build/ElementType/ElTy11PC/ConstModel/libConstModelElTy11PC.so.4",host-name="/home/denzer/projects/arctic/debug-build/ElementType/ElTy11PC/ConstModel/libConstModelElTy11PC.so.4",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/home/denzer/projects/arctic/debug-build/Factory/libFactory.so.4",target-name="/home/denzer/projects/arctic/debug-build/Factory/libFactory.so.4",host-name="/home/denzer/projects/arctic/debug-build/Factory/libFactory.so.4",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/home/denzer/projects/arctic/debug-build/Group/libGroup.so.4",target-name="/home/denzer/projects/arctic/debug-build/Group/libGroup.so.4",host-name="/home/denzer/projects/arctic/debug-build/Group/libGroup.so.4",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/home/denzer/projects/arctic/debug-build/Math/libMath.so.4",target-name="/home/denzer/projects/arctic/debug-build/Math/libMath.so.4",host-name="/home/denzer/projects/arctic/debug-build/Math/libMath.so.4",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/home/denzer/projects/arctic/debug-build/Output/libOutput.so.4",target-name="/home/denzer/projects/arctic/debug-build/Output/libOutput.so.4",host-name="/home/denzer/projects/arctic/debug-build/Output/libOutput.so.4",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/home/denzer/projects/arctic/debug-build/Shape/libShape.so.4",target-name="/home/denzer/projects/arctic/debug-build/Shape/libShape.so.4",host-name="/home/denzer/projects/arctic/debug-build/Shape/libShape.so.4",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/home/denzer/projects/arctic/debug-build/Simulation/libSimulation.so.4",target-name="/home/denzer/projects/arctic/debug-build/Simulation/libSimulation.so.4",host-name="/home/denzer/projects/arctic/debug-build/Simulation/libSimulation.so.4",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/home/denzer/projects/arctic/debug-build/ReadSystemLoad/libReadSystemLoad.so.4",target-name="/home/denzer/projects/arctic/debug-build/ReadSystemLoad/libReadSystemLoad.so.4",host-name="/home/denzer/projects/arctic/debug-build/ReadSystemLoad/libReadSystemLoad.so.4",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/home/denzer/projects/arctic/debug-build/Tensor/libTensor.so.4",target-name="/home/denzer/projects/arctic/debug-build/Tensor/libTensor.so.4",host-name="/home/denzer/projects/arctic/debug-build/Tensor/libTensor.so.4",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libpthread.so.0",target-name="/lib/x86_64-linux-gnu/libpthread.so.0",host-name="/lib/x86_64-linux-gnu/libpthread.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libgomp.so.1",target-name="/usr/lib/x86_64-linux-gnu/libgomp.so.1",host-name="/usr/lib/x86_64-linux-gnu/libgomp.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libgfortran.so.3",target-name="/usr/lib/x86_64-linux-gnu/libgfortran.so.3",host-name="/usr/lib/x86_64-linux-gnu/libgfortran.so.3",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libstdc++.so.6",target-name="/usr/lib/x86_64-linux-gnu/libstdc++.so.6",host-name="/usr/lib/x86_64-linux-gnu/libstdc++.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libm.so.6",target-name="/lib/x86_64-linux-gnu/libm.so.6",host-name="/lib/x86_64-linux-gnu/libm.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libgcc_s.so.1",target-name="/lib/x86_64-linux-gnu/libgcc_s.so.1",host-name="/lib/x86_64-linux-gnu/libgcc_s.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libc.so.6",target-name="/lib/x86_64-linux-gnu/libc.so.6",host-name="/lib/x86_64-linux-gnu/libc.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/librt.so.1",target-name="/lib/x86_64-linux-gnu/librt.so.1",host-name="/lib/x86_64-linux-gnu/librt.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libquadmath.so.0",target-name="/usr/lib/x86_64-linux-gnu/libquadmath.so.0",host-name="/usr/lib/x86_64-linux-gnu/libquadmath.so.0",symbols-loaded="0",thread-group="i1"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x00007ffff6f16426",func="arctic::ElTy01PC144<2>::constModelInitsElement",args=[{name="this",value="0xa0fdc0"},{name="group",value="..."}],file="/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h",fullname="/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h",line="64"},thread-id="1",stopped-threads="all",core="1"
(gdb) -thread-info
^done,threads=[{id="1",target-id="Thread 0x7ffff7fbe7a0 (LWP 15909)",name="arctic",frame={level="0",addr="0x00007ffff6f16426",func="arctic::ElTy01PC144<2>::constModelInitsElement",args=[{name="this",value="0xa0fdc0"},{name="group",value="..."}],file="/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h",fullname="/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h",line="64"},state="stopped",core="1"}],current-thread-id="1"
(gdb) -break-list
^done,BreakpointTable={nr_rows="1",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="18",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="<MULTIPLE>",times="1",original-location="\"/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h\":64"},{number="1.1",enabled="y",addr="0x00007ffff6f14fb0",func="arctic::ElTy01PC144<3>::constModelInitsElement(arctic::Group&)",file="/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h",fullname="/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h",line="64"},{number="1.2",enabled="y",addr="0x00007ffff6f16426",func="arctic::ElTy01PC144<2>::constModelInitsElement(arctic::Group&)",file="/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h",fullname="/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h",line="64"}]}
(gdb) -stack-list-frames --thread 1 --frame 0 0 21
^done,stack=[frame={level="0",addr="0x00007ffff6f16426",func="arctic::ElTy01PC144<2>::constModelInitsElement",file="/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h",fullname="/home/denzer/projects/arctic/ElementType/ElTy01PC/ElTy01PC144.h",line="64"},frame={level="1",addr="0x00007ffff61da57f",func="arctic::Simulation::initSimulation",file="/home/denzer/projects/arctic/Simulation/initSimulation.cpp",fullname="/home/denzer/projects/arctic/Simulation/initSimulation.cpp",line="131"},frame={level="2",addr="0x00000000004324fe",func="main",file="/home/denzer/projects/arctic/main.cpp",fullname="/home/denzer/projects/arctic/main.cpp",line="140"}]


   
 


Reproducible: Always
Comment 1 Niko Sams 2012-08-25 09:47:37 UTC
This issue is due to the breakpoint gets created at multiple locations, a newer gdb feature. In your case probably because this is an inlined function.

*** This bug has been marked as a duplicate of bug 304730 ***