Bug 289992 - BP inserted while running - hit first time is partial working
Summary: BP inserted while running - hit first time is partial working
Status: RESOLVED DUPLICATE of bug 125671
Alias: None
Product: kdevelop
Classification: Applications
Component: CPP Debugger (show other bugs)
Version: git master
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: 4.2.3
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-28 09:43 UTC by leon pollak
Modified: 2012-05-02 15:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description leon pollak 2011-12-28 09:43:29 UTC
Version:           git master (using KDE 4.6.5) 
OS:                Linux

Insert a BP while the application runs - now, when it is hit, the "Locals" element in the "Variables" window is disabled (has no '>' before it) and most of the gdb control buttons (step over, step into, etc.) do nothing. Only "Continue" works.
The second BP hit (by "continue") already opens everything as required and works fine.
HINT: As I do remote debugging, may be this behaviour is somehow connected to the delay, which takes place between each command issuing and reply arrival...

Reproducible: Always

Steps to Reproduce:
1. Run some application with a loop.
2. While running, insert BP inside the loop.
3. The first BP hit is working "partially", as described above.


Expected Results:  
Normal BP hit with data display and controls working.
Comment 1 Niko Sams 2011-12-30 12:56:43 UTC
I can't reproduce using a simple test application.

Please post the console output (only until the breakpoint is first hit)

and the output you get when clicking step over that does nothing.
Comment 2 leon pollak 2011-12-30 22:17:16 UTC
I succeeded to reproduce this on PC (not in the office till 3 jan).
This is the output after loading and stopping at the first line of main() routine:
(gdb) -gdb-exit
(gdb) quit
^exit
gdb --interpreter=mi2 -quiet
(gdb) -gdb-show version
GNU gdb (GDB) Fedora (7.3.1-46.fc15)
Copyright (C) 2011 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-redhat-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 /usr/share/kde4/apps/kdevgdb/printers/gdbinit
source /usr/share/kde4/apps/kdevgdb/printers/gdbinit
^done
(gdb) -inferior-tty-set /dev/pts/21
^done
(gdb) -environment-cd /Projects/CSU/BuildPC
^done
(gdb) -gdb-set print static-members on
^done
(gdb) -gdb-set print asm-demangle on
^done
(gdb) source /Projects/CSU/BuildPC/.gdbinit
source /Projects/CSU/BuildPC/.gdbinit
Breakpoint 1 at 0x8098d86: file /Projects/CSU/src/main.cpp, line 35.
=thread-group-started,id="i1",pid="32445"
=thread-created,id="1",group-id="i1"
^running
*running,thread-id="all"
=library-loaded,id="/lib/ld-linux.so.2",target-name="/lib/ld-linux.so.2",host-name="/lib/ld-linux.so.2",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/libnsl.so.1",target-name="/lib/libnsl.so.1",host-name="/lib/libnsl.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/librt.so.1",target-name="/lib/librt.so.1",host-name="/lib/librt.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/libdl.so.2",target-name="/lib/libdl.so.2",host-name="/lib/libdl.so.2",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/libpthread.so.0",target-name="/lib/libpthread.so.0",host-name="/lib/libpthread.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/libstdc++.so.6",target-name="/usr/lib/libstdc++.so.6",host-name="/usr/lib/libstdc++.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/libm.so.6",target-name="/lib/libm.so.6",host-name="/lib/libm.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/libgcc_s.so.1",target-name="/lib/libgcc_s.so.1",host-name="/lib/libgcc_s.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/libc.so.6",target-name="/lib/libc.so.6",host-name="/lib/libc.so.6",symbols-loaded="0",thread-group="i1"
[Thread debugging using libthread_db enabled]
Traceback (most recent call last):
File "/usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.16-gdb.py", line 59, in <module>
from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named v6.printers
=thread-created,id="2",group-id="i1"
[New Thread 0xf7fd4b70 (LWP 32448)]
*running,thread-id="all"

Breakpoint 1, main (argc=1, argv=0xffffd7c4) at /Projects/CSU/src/main.cpp:35
35 _lCEIN_ = NoSwapL;
*stopped,frame={addr="0x08098d86",func="main",args=[{name="argc",value="1"},{name="argv",value="0xffffd7c4"}],file="/Projects/CSU/src/main.cpp",fullname="/Projects/CSU/src/main.cpp",line="35"},thread-id="1",stopped-threads="all",core="5"
(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="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="0x08098d86",func="main(int, char**)",file="/Projects/CSU/src/main.cpp",fullname="/Projects/CSU/src/main.cpp",line="35",times="1",original-location="main"}]}
(gdb) -break-insert -f ""
^error,msg="Unmatched single quote."
(gdb) -stack-list-locals --frame 0 --simple-values
^error,msg="Cannot specify --frame without --thread"
(gdb) -var-update --frame 0 --all-values *
^error,msg="Cannot specify --frame without --thread"
(gdb) -thread-info
^done,threads=[{id="2",target-id="Thread 0xf7fd4b70 (LWP 32448)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="6"},{id="1",target-id="Thread 0xf7fd66d0 (LWP 32445)",name="csu",frame={level="0",addr="0x08098d86",func="main",args=[{name="argc",value="1"},{name="argv",value="0xffffd7c4"}],file="/Projects/CSU/src/main.cpp",fullname="/Projects/CSU/src/main.cpp",line="35"},state="stopped",core="5"}],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="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="0x08098d86",func="main(int, char**)",file="/Projects/CSU/src/main.cpp",fullname="/Projects/CSU/src/main.cpp",line="35",times="1",original-location="main"}]}
(gdb) -stack-list-frames --thread 1 --frame 0 0 21
^done,stack=[frame={level="0",addr="0x08098d86",func="main",file="/Projects/CSU/src/main.cpp",fullname="/Projects/CSU/src/main.cpp",line="35"}]
(gdb) -stack-list-locals --thread 1 --frame 0 --simple-values
^done,locals=[{name="keys",type="const ucommon::keydata *",value="0x8092321"},{name="str",type="char *",value="0xffff <Address 0xffff out of bounds>"},{name="File",type="FILE *",value="0x80ab090"},{name="p",type="char *",value="0x1 <Address 0x1 out of bounds>"},{name="strr",type="char *",value="0x1 <Address 0x1 out of bounds>"}]
(gdb) -var-update --thread 1 --frame 0 --all-values *
^done,changelist=[]
(gdb) -stack-list-arguments --thread 1 --frame 0 0 0 0
^done,stack-args=[frame={level="0",args=[name="argc",name="argv"]}]
(gdb) -var-create --thread 1 --frame 0 var178 @ "keys"
^done,name="var178",numchild="2",value="0x8092321",type="const ucommon::keydata *",thread-id="1",has_more="0"
(gdb) -var-create --thread 1 --frame 0 var179 @ "str"
^done,name="var179",numchild="1",value="0xffff <Address 0xffff out of bounds>",type="char *",thread-id="1",has_more="0"
(gdb) -var-create --thread 1 --frame 0 var180 @ "File"
^done,name="var180",numchild="1",value="0x80ab090",type="FILE *",thread-id="1",has_more="0"
(gdb) -var-create --thread 1 --frame 0 var181 @ "p"
^done,name="var181",numchild="1",value="0x1 <Address 0x1 out of bounds>",type="char *",thread-id="1",has_more="0"
(gdb) -var-create --thread 1 --frame 0 var182 @ "strr"
^done,name="var182",numchild="1",value="0x1 <Address 0x1 out of bounds>",type="char *",thread-id="1",has_more="0"
(gdb) -var-create --thread 1 --frame 0 var183 @ "argc"
^done,name="var183",numchild="0",value="1",type="int",thread-id="1",has_more="0"
(gdb) -var-create --thread 1 --frame 0 var184 @ "argv"
^done,name="var184",numchild="1",value="0xffffd7c4",type="char **",thread-id="1",has_more="0"
-----------------------------------
Now, I press "run":
(gdb) -exec-continue
^running
*running,thread-id="1"
*running,thread-id="all"
=thread-created,id="3",group-id="i1"
[New Thread 0xf7ff9b70 (LWP 32465)]
*running,thread-id="all"
=thread-created,id="4",group-id="i1"
[New Thread 0xf7ff5b70 (LWP 32466)]
*running,thread-id="all"
=thread-created,id="5",group-id="i1"
[New Thread 0xf7ff1b70 (LWP 32467)]
*running,thread-id="all"
=thread-created,id="6",group-id="i1"
[New Thread 0xf7fedb70 (LWP 32468)]
*running,thread-id="all"
=thread-created,id="7",group-id="i1"
[New Thread 0xf7fe9b70 (LWP 32469)]
*running,thread-id="all"
=thread-created,id="8",group-id="i1"
[New Thread 0xf7fe5b70 (LWP 32470)]
*running,thread-id="all"
------------------------------------
Now, I open the thread with 'while(1)' loop - it has sleep for 100ms and some processing. And I insert the BP inside the loop. The application stops. The gdb output now is a bit scrambled - I show several last lines again, as the last one is scrambled:
*running,thread-id="all"
=thread-created,id="6",group-id="i1"
[New Thread 0xf7fedb70 (LWP 32468)]
*running,thread-id="all"
=thread-created,id="7",group-id="i1"
[New Thread 0xf7fe9b70 (LWP 32469)]
*running,thread-id="all"
=thread-created,id="8",group-id="i1"
*stopped,reason="signal-received",signal-name="SIGINT",signal-meaning="Interrupt",frame={addr="0x00110430",func="__kernel_vsyscall",args=[]},thread-id="1",stopped-threads="all",core="4"
(gdb) -break-insert -f "\"/Projects/CSU/src/CSHs/CSH_DISCR.cpp\":150"
^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x0809ffdb",func="cCSH_DISCR::RecvInPkt()",file="/Projects/CSU/src/CSHs/CSH_DISCR.cpp",fullname="/Projects/CSU/src/CSHs/CSH_DISCR.cpp",line="150",times="0",original-location="\"/Projects/CSU/src/CSHs/CSH_DISCR.cpp\":150"}
(gdb) -var-create --thread 1 --frame 0 var185 @ "SYS_CPU"
^error,msg="-var-create: unable to create variable object"
(gdb) -var-create --thread 1 --frame 0 var186 @ "SYS_CPU"
^error,msg="-var-create: unable to create variable object"
(gdb) -thread-info
^done,threads=[{id="8",target-id="Thread 0xf7fe5b70 (LWP 32470)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="5"},{id="7",target-id="Thread 0xf7fe9b70 (LWP 32469)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="5"},{id="6",target-id="Thread 0xf7fedb70 (LWP 32468)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="2"},{id="5",target-id="Thread 0xf7ff1b70 (LWP 32467)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="4"},{id="4",target-id="Thread 0xf7ff5b70 (LWP 32466)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="3"},{id="3",target-id="Thread 0xf7ff9b70 (LWP 32465)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="0"},{id="2",target-id="Thread 0xf7fd4b70 (LWP 32448)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="2"},{id="1",target-id="Thread 0xf7fd66d0 (LWP 32445)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="4"}],current-thread-id="1"
(gdb) -stack-list-frames --thread 1 --frame 0 0 21
^done,stack=[frame={level="0",addr="0x00110430",func="__kernel_vsyscall"},frame={level="1",addr="0x413cc3c6",func="nanosleep",from="/lib/libc.so.6"},frame={level="2",addr="0x4140076d",func="usleep",from="/lib/libc.so.6"},frame={level="3",addr="0x080aaa4f",func="ucommon::Thread::sleep",file="/Projects/ucommon-5.0.6/corelib/thread.cpp",fullname="/Projects/ucommon-5.0.6/corelib/thread.cpp",line="1995"},frame={level="4",addr="0x08093d1c",func="SystemMonitor",file="/Projects/CSU/src/helpers/SysMon.cpp",fullname="/Projects/CSU/src/helpers/SysMon.cpp",line="25"},frame={level="5",addr="0x08099cff",func="main",file="/Projects/CSU/src/main.cpp",fullname="/Projects/CSU/src/main.cpp",line="85"}]
(gdb) -stack-list-locals --thread 1 --frame 0 --simple-values
^done,locals=[]
(gdb) -exec-continue
^running
*running,thread-id="all"
[Switching to Thread 0xf7ff5b70 (LWP 32466)]
*stopped,reason="breakpoint-hit",disp="keep",bkptno="2",frame={addr="0x0809ffdb",func="cCSH_DISCR::RecvInPkt",args=[{name="this",value="0x80dbf00"}],file="/Projects/CSU/src/CSHs/CSH_DISCR.cpp",fullname="/Projects/CSU/src/CSHs/CSH_DISCR.cpp",line="150"},thread-id="4",stopped-threads="all",core="3"
(gdb) -stack-list-arguments --thread 1 --frame 0 0 0 0
=thread-selected,id="4"
^done,stack-args=[frame={level="0",args=[]}]
(gdb) -thread-info
^done,threads=[{id="8",target-id="Thread 0xf7fe5b70 (LWP 32470)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="5"},{id="7",target-id="Thread 0xf7fe9b70 (LWP 32469)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="5"},{id="6",target-id="Thread 0xf7fedb70 (LWP 32468)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="5"},{id="5",target-id="Thread 0xf7ff1b70 (LWP 32467)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="0"},{id="4",target-id="Thread 0xf7ff5b70 (LWP 32466)",name="csu",frame={level="0",addr="0x0809ffdb",func="cCSH_DISCR::RecvInPkt",args=[{name="this",value="0x80dbf00"}],file="/Projects/CSU/src/CSHs/CSH_DISCR.cpp",fullname="/Projects/CSU/src/CSHs/CSH_DISCR.cpp",line="150"},state="stopped",core="3"},{id="3",target-id="Thread 0xf7ff9b70 (LWP 32465)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="0"},{id="2",target-id="Thread 0xf7fd4b70 (LWP 32448)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="5"},{id="1",target-id="Thread 0xf7fd66d0 (LWP 32445)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="2"}],current-thread-id="1"
(gdb) -stack-list-frames --thread 1 --frame 0 0 21
^done,stack=[frame={level="0",addr="0x00110430",func="__kernel_vsyscall"},frame={level="1",addr="0x413cc3c6",func="nanosleep",from="/lib/libc.so.6"},frame={level="2",addr="0x4140076d",func="usleep",from="/lib/libc.so.6"},frame={level="3",addr="0x080aaa4f",func="ucommon::Thread::sleep",file="/Projects/ucommon-5.0.6/corelib/thread.cpp",fullname="/Projects/ucommon-5.0.6/corelib/thread.cpp",line="1995"},frame={level="4",addr="0x08093d1c",func="SystemMonitor",file="/Projects/CSU/src/helpers/SysMon.cpp",fullname="/Projects/CSU/src/helpers/SysMon.cpp",line="25"},frame={level="5",addr="0x08099cff",func="main",file="/Projects/CSU/src/main.cpp",fullname="/Projects/CSU/src/main.cpp",line="85"}]
(gdb) -stack-list-locals --thread 1 --frame 0 --simple-values
^done,locals=[]
(gdb) -var-update --thread 1 --frame 0 --all-values *
^done,changelist=[{name="var184",in_scope="false",type_changed="false",has_more="0"},{name="var183",in_scope="false",type_changed="false",has_more="0"},{name="var182",in_scope="false",type_changed="false",has_more="0"},{name="var181",in_scope="false",type_changed="false",has_more="0"},{name="var180",in_scope="false",type_changed="false",has_more="0"},{name="var179",value="{ucommon::String (ucommon::CharacterProtocol *, ucommon::strsize_t)} 0x80b4a4c <str(ucommon::CharacterProtocol*, unsigned short)>",in_scope="true",type_changed="true",new_type="ucommon::String (ucommon::CharacterProtocol *, ucommon::strsize_t)",new_num_children="0",has_more="0"},{name="var178",in_scope="false",type_changed="false",has_more="0"}]
(gdb) -break-list
^done,BreakpointTable={nr_rows="2",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="0x08098d86",func="main(int, char**)",file="/Projects/CSU/src/main.cpp",fullname="/Projects/CSU/src/main.cpp",line="35",times="1",original-location="main"},bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x0809ffdb",func="cCSH_DISCR::RecvInPkt()",file="/Projects/CSU/src/CSHs/CSH_DISCR.cpp",fullname="/Projects/CSU/src/CSHs/CSH_DISCR.cpp",line="150",times="1",original-location="\"/Projects/CSU/src/CSHs/CSH_DISCR.cpp\":150"}]}
(gdb) -var-delete "var178"
^done,ndeleted="1"
(gdb) -var-delete "var179"
^done,ndeleted="1"
(gdb) -var-delete "var180"
^done,ndeleted="1"
(gdb) -var-delete "var181"
^done,ndeleted="1"
(gdb) -var-delete "var182"
^done,ndeleted="1"
(gdb) -var-delete "var183"
^done,ndeleted="1"
(gdb) -var-delete "var184"
^done,ndeleted="1"
(gdb) -stack-list-arguments --thread 1 --frame 0 0 0 0
^done,stack-args=[frame={level="0",args=[]}]
(gdb) -var-create --thread 1 --frame 0 var187 @ "can"
^error,msg="-var-create: unable to create variable object"
(gdb) -var-create --thread 1 --frame 0 var188 @ "can"
^error,msg="-var-create: unable to create variable object"
(gdb) -var-create --thread 1 --frame 0 var189 @ "emulate"
^error,msg="-var-create: unable to create variable object"

----------------------------------------------
Now, as I said, the "Locals" has no '>' sign and does not present local data.
Now I press "Step next". I do not know what happens to the application, but just not the step:

(gdb) -exec-next
Single stepping until exit from function __kernel_vsyscall,
which has no line number information.
^running
*running,thread-id="1"
*stopped,reason="end-stepping-range",frame={addr="0x413cc3c6",func="nanosleep",args=[],from="/lib/libc.so.6"},thread-id="1",stopped-threads="all",core="6"
(gdb) -thread-info
^done,threads=[{id="8",target-id="Thread 0xf7fe5b70 (LWP 32470)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="5"},{id="7",target-id="Thread 0xf7fe9b70 (LWP 32469)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="5"},{id="6",target-id="Thread 0xf7fedb70 (LWP 32468)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="5"},{id="5",target-id="Thread 0xf7ff1b70 (LWP 32467)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="0"},{id="4",target-id="Thread 0xf7ff5b70 (LWP 32466)",name="csu",frame={level="0",addr="0x0809ffdb",func="cCSH_DISCR::RecvInPkt",args=[{name="this",value="0x80dbf00"}],file="/Projects/CSU/src/CSHs/CSH_DISCR.cpp",fullname="/Projects/CSU/src/CSHs/CSH_DISCR.cpp",line="150"},state="stopped",core="3"},{id="3",target-id="Thread 0xf7ff9b70 (LWP 32465)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="0"},{id="2",target-id="Thread 0xf7fd4b70 (LWP 32448)",name="csu",frame={level="0",addr="0x00110430",func="__kernel_vsyscall",args=[]},state="stopped",core="5"},{id="1",target-id="Thread 0xf7fd66d0 (LWP 32445)",name="csu",frame={level="0",addr="0x413cc3c6",func="nanosleep",args=[],from="/lib/libc.so.6"},state="stopped",core="6"}],current-thread-id="1"
(gdb) -stack-list-frames --thread 1 --frame 0 0 21
^done,stack=[frame={level="0",addr="0x413cc3c6",func="nanosleep",from="/lib/libc.so.6"},frame={level="1",addr="0x4140076d",func="usleep",from="/lib/libc.so.6"},frame={level="2",addr="0x080aaa4f",func="ucommon::Thread::sleep",file="/Projects/ucommon-5.0.6/corelib/thread.cpp",fullname="/Projects/ucommon-5.0.6/corelib/thread.cpp",line="1995"},frame={level="3",addr="0x08093d1c",func="SystemMonitor",file="/Projects/CSU/src/helpers/SysMon.cpp",fullname="/Projects/CSU/src/helpers/SysMon.cpp",line="25"},frame={level="4",addr="0x08099cff",func="main",file="/Projects/CSU/src/main.cpp",fullname="/Projects/CSU/src/main.cpp",line="85"}]
(gdb) -stack-list-locals --thread 1 --frame 0 --simple-values
^done,locals=[]
(gdb) -var-update --thread 1 --frame 0 --all-values *
^done,changelist=[]
(gdb) -break-list
^done,BreakpointTable={nr_rows="2",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="0x08098d86",func="main(int, char**)",file="/Projects/CSU/src/main.cpp",fullname="/Projects/CSU/src/main.cpp",line="35",times="1",original-location="main"},bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x0809ffdb",func="cCSH_DISCR::RecvInPkt()",file="/Projects/CSU/src/CSHs/CSH_DISCR.cpp",fullname="/Projects/CSU/src/CSHs/CSH_DISCR.cpp",line="150",times="1",original-location="\"/Projects/CSU/src/CSHs/CSH_DISCR.cpp\":150"}]}
(gdb) -stack-list-arguments --thread 1 --frame 0 0 0 0
^done,stack-args=[frame={level="0",args=[]}]
(gdb) -var-create --thread 1 --frame 0 var190 @ "can"
^error,msg="-var-create: unable to create variable object"
(gdb) -var-create --thread 1 --frame 0 var191 @ "can"
^error,msg="-var-create: unable to create variable object"

Hope this helps.
Comment 3 Niko Sams 2011-12-31 09:30:51 UTC
you are inside libc:
(gdb) -stack-list-frames --thread 1 --frame 0 0 21
^done,stack=[frame={level="0",addr="0x00110430",func="__kernel_vsyscall"},frame={level="1",addr="0x413cc3c6",func="nanosleep",from="/lib/libc.so.6"},frame=

and there step into and listing locals won't work as you don't have debug symbols.

Open the Frame Stack tool view to see that.

Now the question is why gdb breaks inside libc, as you don't have a breakpoint set inside.
Comment 4 leon pollak 2011-12-31 13:09:33 UTC
You were right - gdb stops in libc, although BP is in the application.
One more thing I found:
If the "debug" workset does NOT have "Variables" window opened (only "Project" opened, for example) - then everything works fine!
I mean, when I insert BP and application stops and I open only now the "Variables" - I see locals OK and I can make steps! Everything is perfect! But just if the "Variables" was closed before.
How can i be useful more?
Comment 5 Niko Sams 2012-01-15 17:40:44 UTC
marking as duplicate, as it's the same problem.

I have no idea why this depends on "Variables" shown.

*** This bug has been marked as a duplicate of bug 125671 ***
Comment 6 leon pollak 2012-02-05 16:44:45 UTC
I downloaded the master and the problem about which we exchanged mails is
still there.
 
But now I have the example code that demonstrates the problem.
Just follow the instructions and it is very well repeatable...:-)
 
Please, compile the following C++ text:

int main(int argc, char* argv[]) {
pthread_t thread1;
void* func(void* v);
pthread_create( &thread1, NULL, func, NULL);
pthread_join( thread1, NULL);
}

void* func(void* t) {
int i;
        while(1) {
                sleep(2);
                i++;
        }
 }
 
The line with i++ is the line to be considered.
 
Now, set the BP at the first line in main function (just for convenience)
Comment 7 leon pollak 2012-02-05 16:47:02 UTC
Now, set the BP at the first line in main function (just for convenience).
Start the application and make it run - it will stop at the BP.

Great. Now, run it free - it will run and not stop, as there is no BP defined.

Now, press the "Interrupt" button in the debugger.
The application will stop, but as it will most probably stop in the sleep(2) 
function, there will be no "Locals". OK - this is what we need.

Now, press the "Continue" button - application runs again.

Now, WHILE RUNNING(!), insert the BP on the 'i++' line.
When the sleep timeout expires and application stops at the 'i++' line, in my 
installation the "Locals" are still disabled (have no '>' sign and nothing 
appears active, all the 'step' buttons are not functional, etc...

Please, let me know if you can reproduce the issue.
Comment 8 leon pollak 2012-04-15 11:32:05 UTC
Hello, Niko.
It seems that I was in a hurry a bit - the problem still remains in the master from 14 April.
And the test case I provided reproduces it, but now with a small correction: 
1. First, press the "Interrupt" (and catch the application while in sleep()) and then click the "Locals" - this will move the "locals" to the "disabled" state - no data presented, no '>' sign.
2. Then press "Continue" button.
3. Now WHILE RUNNING insert the BP on 'i++' close. When the sleep time expires, the BP is hit in the old incorrect way.

Sorry to disappoint you...:-)
Comment 9 Niko Sams 2012-04-21 18:19:46 UTC
I can not reproduce :/

 Maybe the easiest would be if you could record a screencast where I can see the problem.
Comment 10 Niko Sams 2012-04-21 18:51:14 UTC
I found something, maybe it's related.

Please re-test with current master (including kdevplatform 1a2aca2bed4)
Comment 11 leon pollak 2012-05-01 09:54:03 UTC
Sorry for the late reply - I was out of the office for this week.
I downloaded the master today and retested - the problem remains and is reproducable as I described in the post from 2012-04-15 11:32:05 UTC.
How can I be more useful?
What do you mean by "record a screencast"?
Comment 12 leon pollak 2012-05-01 10:18:02 UTC
Small correction: reproducing of the bug is now even simpler:
1. Put the BP at main().
2. Run the application - it stops at main.
3. Press "continue".
4. While running, insert the BP on 'i++'.
5. When the BP is hit, the 'Locals' are disabled.
Comment 13 Niko Sams 2012-05-01 16:26:25 UTC
Please try again after another change I just pushed.

> What do you mean by "record a screencast"?
use a tool like recordmydesktop to show your problem.
Comment 14 leon pollak 2012-05-02 15:49:22 UTC
Hello, Niko.
No, the last master does not correct the problem.
I run the recordmydesktop tool as you recommended while executing the test application. 
The file may be found in:
ftp://www.plris.com/pub/out.ogv
Note the differense between the 'Local' state after each breakpoint hit. I tried to underline this by making circles with the mouse pointer over the 'local' display.
Hope this helps...