Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-debug-dev] Execution lost in pthread while debuggingwithCygwin GDB

Mikhail,

This is the gdb trace file at the point where execution gets lost.
It always seem to happen in a pthread call.

~Sudhan

"0x5342d2 \"DBM Processor\""}],file="../system/thread.cpp",line="89"}
[1,144,342,496,789] (gdb)
[1,144,342,496,789] 120-stack-info-depth
[1,144,342,496,804] 120^done,depth="5"
[1,144,342,496,804] (gdb)
[1,144,342,496,804] 121-stack-list-frames 0 5
[1,144,342,496,820] 121^done,stack=[frame={level="0",addr="0x00419a5f",func="WvT
hread::WvThread",fil\
e="../system/thread.cpp",line="89"},frame={level="1",addr="0x00419d29",func="Con
tentManager::Content\
Manager",file="../content/content_mgr.cpp",line="49"},frame={level="2",addr="0x0
040365b",func="start\
_stb",file="../stb_core/stb_core.cpp",line="88"},frame={level="3",addr="0x004018
5f",func="realMain",\
file="../appSTB.cpp",line="599"},frame={level="4",addr="0x004010ed",func="main",
file="../appSTB.cpp"\
,line="347"}]
[1,144,342,496,820] (gdb)
[1,144,342,496,820] 122-var-update var1
[1,144,342,496,820] 122^done,changelist=[]
[1,144,342,496,820] (gdb)
[1,144,342,496,820] 123-var-update var2
[1,144,342,496,836] 123^done,changelist=[]
[1,144,342,496,836] (gdb)
[1,144,342,496,836] 124-var-update var3
[1,144,342,496,851] 124^done,changelist=[]
[1,144,342,496,851] (gdb)
[1,144,342,496,851] 125-data-list-changed-registers
[1,144,342,496,867] 125^done,changed-registers=["0","1","3","8","9"]
[1,144,342,496,867] (gdb)
[1,144,342,496,867] 126 info sharedlibrary
[1,144,342,496,867] &"info sharedlibrary\n"
[1,144,342,496,867] ~"DLL Name
     Load Address\n\
"
[1,144,342,496,867] ~"ntdll.dll
     7c901000\n"
[1,144,342,496,867] ~"/cygdrive/c/WINDOWS/system32/kernel32.dll
     7c801000\n"
[1,144,342,496,867] ~"/usr/bin/cygwin1.dll
     61001000\n"
[1,144,342,496,867] ~"/cygdrive/c/WINDOWS/system32/advapi32.dll
     77dd1000\n"
[1,144,342,496,867] ~"/cygdrive/c/WINDOWS/system32/rpcrt4.dll
     77e71000\n"
[1,144,342,496,867] ~"/cygdrive/c/WINDOWS/system32/mpr.dll
     71b21000\n"
[1,144,342,496,867] ~"/cygdrive/c/WINDOWS/system32/user32.dll
     77d41000\n"
[1,144,342,496,867] ~"/cygdrive/c/WINDOWS/system32/gdi32.dll
     77f11000\n"
[1,144,342,496,867] ~"/cygdrive/c/WINDOWS/system32/secur32.dll
     77fe1000\n"
[1,144,342,496,867] ~"/cygdrive/c/WINDOWS/system32/wsock32.dll
     71ad1000\n"
[1,144,342,496,867] ~"/cygdrive/c/WINDOWS/system32/ws2_32.dll
     71ab1000\n"
[1,144,342,496,883] ~"/cygdrive/c/WINDOWS/system32/msvcrt.dll
     77c11000\n"
[1,144,342,496,883] ~"/cygdrive/c/WINDOWS/system32/ws2help.dll
     71aa1000\n"
[1,144,342,496,883] ~"/cygdrive/c/WINDOWS/system32/mswsock.dll
     71a51000\n"
[1,144,342,496,883] ~"/cygdrive/c/WINDOWS/system32/hnetcfg.dll
     662b1000\n"
[1,144,342,496,883] ~"/cygdrive/c/WINDOWS/System32/wshtcpip.dll
     71a91000\n"
[1,144,342,496,883] ~"/cygdrive/c/WINDOWS/system32/dnsapi.dll
     76f21000\n"
[1,144,342,496,883] ~"/cygdrive/c/WINDOWS/System32/winrnr.dll
     76fb1000\n"
[1,144,342,496,883] ~"/cygdrive/c/WINDOWS/system32/wldap32.dll
     76f61000\n"
[1,144,342,496,883] ~"/cygdrive/c/Program Files/Bonjour/mdnsNSP.dll
     19781000\n"
[1,144,342,496,883] ~"/cygdrive/c/Program Files/Bonjour/dnssd.dll
     197a1000\n"
[1,144,342,496,883] ~"/cygdrive/c/WINDOWS/system32/iphlpapi.dll
     76d61000\n"
[1,144,342,496,883] 126^done
[1,144,342,496,883] (gdb)
[1,144,342,498,383] 127-exec-step 1
[1,144,342,498,383] 127^running
[1,144,342,498,383] (gdb)
[1,144,342,498,399] 127*stopped,reason="end-stepping-range",thread-id="1",frame=
{addr="0x0042329a",f\
unc="WvSemaphore::WvSemaphore",args=[{name="this",value="0xfe402c"},{name="cnt",
value="0"}],file="..\
/system/semaphore.cpp",line="53"}
[1,144,342,498,399] (gdb)
[1,144,342,498,399] 128 info threads
[1,144,342,498,399] &"info threads\n"
[1,144,342,498,399] ~"  2 thread 3552.0x7e4  "
[1,144,342,498,399] ~"* 1 thread 3552.0x3f8  "
[1,144,342,498,399] 128^done,frame={addr="0x7c90eb94",func="ntdll!LdrAccessResou
rce",args=[],from="n\
tdll.dll"},frame={func="WvSemaphore::WvSemaphore",args=[{name="this",value="0xfe
402c"},{name="cnt",v\
alue="0"}],file="../system/semaphore.cpp",line="53"}
[1,144,342,498,414] (gdb)
[1,144,342,498,414] 129-stack-info-depth
[1,144,342,498,414] 129^done,depth="5"
[1,144,342,498,414] (gdb)
[1,144,342,498,414] 130-stack-list-frames 0 5
[1,144,342,498,430] 130^done,stack=[frame={level="0",addr="0x0042329a",func="WvS
emaphore::WvSemaphor\
e",file="../system/semaphore.cpp",line="53"},frame={level="1",addr="0x00419d78",
func="ContentManager\
::ContentManager",file="../content/content_mgr.cpp",line="49"},frame={level="2",
addr="0x0040365b",fu\
nc="start_stb",file="../stb_core/stb_core.cpp",line="88"},frame={level="3",addr=
"0x0040185f",func="r\
ealMain",file="../appSTB.cpp",line="599"},frame={level="4",addr="0x004010ed",fun
c="main",file="../ap\
pSTB.cpp",line="347"}]
[1,144,342,498,430] (gdb)
[1,144,342,498,430] 131-var-update var1
[1,144,342,498,446] 131^done,changelist=[]
[1,144,342,498,446] (gdb)
[1,144,342,498,446] 132-var-update var2
[1,144,342,498,446] 132^done,changelist=[]
[1,144,342,498,446] (gdb)
[1,144,342,498,446] 133-var-update var3
[1,144,342,498,461] 133^done,changelist=[]
[1,144,342,498,461] (gdb)
[1,144,342,498,461] 134-data-list-changed-registers
[1,144,342,498,477] 134^done,changed-registers=["0","3","8","9"]
[1,144,342,498,477] (gdb)
[1,144,342,498,477] 135 info sharedlibrary
[1,144,342,498,477] &"info sharedlibrary\n"
[1,144,342,498,477] ~"DLL Name
     Load Address\n\
"
[1,144,342,498,477] ~"ntdll.dll
     7c901000\n"
[1,144,342,498,477] ~"/cygdrive/c/WINDOWS/system32/kernel32.dll
     7c801000\n"
[1,144,342,498,477] ~"/usr/bin/cygwin1.dll
     61001000\n"
[1,144,342,498,477] ~"/cygdrive/c/WINDOWS/system32/advapi32.dll
     77dd1000\n"
[1,144,342,498,493] ~"/cygdrive/c/WINDOWS/system32/rpcrt4.dll
     77e71000\n"
[1,144,342,498,493] ~"/cygdrive/c/WINDOWS/system32/mpr.dll
     71b21000\n"
[1,144,342,498,493] ~"/cygdrive/c/WINDOWS/system32/user32.dll
     77d41000\n"
[1,144,342,498,493] ~"/cygdrive/c/WINDOWS/system32/gdi32.dll
     77f11000\n"
[1,144,342,498,493] ~"/cygdrive/c/WINDOWS/system32/secur32.dll
     77fe1000\n"
[1,144,342,498,493] ~"/cygdrive/c/WINDOWS/system32/wsock32.dll
     71ad1000\n"
[1,144,342,498,493] ~"/cygdrive/c/WINDOWS/system32/ws2_32.dll
     71ab1000\n"
[1,144,342,498,493] ~"/cygdrive/c/WINDOWS/system32/msvcrt.dll
     77c11000\n"
[1,144,342,498,493] ~"/cygdrive/c/WINDOWS/system32/ws2help.dll
     71aa1000\n"
[1,144,342,498,493] ~"/cygdrive/c/WINDOWS/system32/mswsock.dll
     71a51000\n"
[1,144,342,498,493] ~"/cygdrive/c/WINDOWS/system32/hnetcfg.dll
     662b1000\n"
[1,144,342,498,493] ~"/cygdrive/c/WINDOWS/System32/wshtcpip.dll
     71a91000\n"
[1,144,342,498,493] ~"/cygdrive/c/WINDOWS/system32/dnsapi.dll
     76f21000\n"
[1,144,342,498,493] ~"/cygdrive/c/WINDOWS/System32/winrnr.dll
     76fb1000\n"
[1,144,342,498,493] ~"/cygdrive/c/WINDOWS/system32/wldap32.dll
     76f61000\n"
[1,144,342,498,493] ~"/cygdrive/c/Program Files/Bonjour/mdnsNSP.dll
     19781000\n"
[1,144,342,498,493] ~"/cygdrive/c/Program Files/Bonjour/dnssd.dll
     197a1000\n"
[1,144,342,498,493] ~"/cygdrive/c/WINDOWS/system32/iphlpapi.dll
     76d61000\n"
[1,144,342,498,493] 135^done
[1,144,342,498,493] (gdb)
[1,144,342,498,539] 136-data-disassemble -f ../system/semaphore.cpp -l 53 -n 100
-- 1
[1,144,342,498,555] 136^done,asm_insns=[src_and_asm_line={line="52",file="../sys
tem/semaphore.cpp",l\
ine_asm_insn=[{address="0x00423230",func-name="_ZN11WvSemaphoreC2Ej",offset="0",
inst="push   %ebp"},\
{address="0x00423231",func-name="_ZN11WvSemaphoreC2Ej",offset="1",inst="mov %
esp,%ebp"},{address=\
"0x00423233",func-name="_ZN11WvSemaphoreC2Ej",offset="3",inst="sub $0x8,%esp"
}]},src_and_asm_line\
={line="53",file="../system/semaphore.cpp",line_asm_insn=[{address="0x00423236",
func-name="_ZN11WvSe\
maphoreC2Ej",offset="6",inst="movl $0x0,0x4(%esp)"},{address="0x0042323e",func
-name="_ZN11WvSemaph\
oreC2Ej",offset="14",inst="mov 0x8(%ebp),%eax"},{address="0x00423241",func-na
me="_ZN11WvSemaphore\
C2Ej",offset="17",inst="mov %eax,(%esp)"},{address="0x00423244",func-name="_Z
N11WvSemaphoreC2Ej",\
offset="20",inst="call 0x460960 <pthread_mutex_init>"}]},src_and_asm_line={lin
e="54",file="../syst\
em/semaphore.cpp",line_asm_insn=[{address="0x00423249",func-name="_ZN11WvSemapho
reC2Ej",offset="25",\
inst="movl $0x0,0x4(%esp)"},{address="0x00423251",func-name="_ZN11WvSemaphoreC
2Ej",offset="33",ins\
t="mov 0x8(%ebp),%eax"},{address="0x00423254",func-name="_ZN11WvSemaphoreC2Ej
",offset="36",inst="\
add $0x4,%eax"},{address="0x00423257",func-name="_ZN11WvSemaphoreC2Ej",offset
="39",inst="mov    %\
eax,(%esp)"},{address="0x0042325a",func-name="_ZN11WvSemaphoreC2Ej",offset="42",
inst="call   0x4609e\
0 <pthread_cond_init>"}]},src_and_asm_line={line="55",file="../system/semaphore.
cpp",line_asm_insn=[\
{address="0x0042325f",func-name="_ZN11WvSemaphoreC2Ej",offset="47",inst="movl
$0x0,0x4(%esp)"},{ad\
dress="0x00423267",func-name="_ZN11WvSemaphoreC2Ej",offset="55",inst="mov 0x8
(%ebp),%eax"},{addre\
ss="0x0042326a",func-name="_ZN11WvSemaphoreC2Ej",offset="58",inst="add $0x8,%
eax"},{address="0x00\
42326d",func-name="_ZN11WvSemaphoreC2Ej",offset="61",inst="mov %eax,(%esp)"},
{address="0x00423270\
",func-name="_ZN11WvSemaphoreC2Ej",offset="64",inst="call 0x4609e0 <pthread_co
nd_init>"}]},src_and\
_asm_line={line="56",file="../system/semaphore.cpp",line_asm_insn=[{address="0x0
0423275",func-name="\
_ZN11WvSemaphoreC2Ej",offset="69",inst="mov 0x8(%ebp),%edx"},{address="0x0042
3278",func-name="_ZN\
11WvSemaphoreC2Ej",offset="72",inst="mov 0xc(%ebp),%eax"},{address="0x0042327
b",func-name="_ZN11W\
vSemaphoreC2Ej",offset="75",inst="mov %eax,0xc(%edx)"}]},src_and_asm_line={li
ne="57",file="../sys\
tem/semaphore.cpp",line_asm_insn=[{address="0x0042327e",func-name="_ZN11WvSemaph
oreC2Ej",offset="78"\
,inst="mov 0x8(%ebp),%edx"},{address="0x00423281",func-name="_ZN11WvSemaphore
C2Ej",offset="81",in\
st="mov 0x8(%ebp),%eax"},{address="0x00423284",func-name="_ZN11WvSemaphoreC2E
j",offset="84",inst=\
"movl $0x0,0x14(%eax)"},{address="0x0042328b",func-name="_ZN11WvSemaphoreC2Ej"
,offset="91",inst="m\
ovl $0x0,0x10(%edx)"}]},src_and_asm_line={line="58",file="../system/semaphore.
cpp",line_asm_insn=[\
{address="0x00423292",func-name="_ZN11WvSemaphoreC2Ej",offset="98",inst="leave
"},{address="0x00423\
293",func-name="_ZN11WvSemaphoreC2Ej",offset="99",inst="ret    "}]}]
[1,144,342,498,571] (gdb)
[1,144,342,498,571] 137-data-disassemble -s 0x42329a -e 0x4232fe -- 0
[1,144,342,498,586] 137^done,asm_insns=[{address="0x0042329a",func-name="_ZN11Wv
SemaphoreC1Ej",offse\
t="6",inst="movl $0x0,0x4(%esp)"},{address="0x004232a2",func-name="_ZN11WvSema
phoreC1Ej",offset="1\
4",inst="mov 0x8(%ebp),%eax"},{address="0x004232a5",func-name="_ZN11WvSemapho
reC1Ej",offset="17",\
inst="mov %eax,(%esp)"},{address="0x004232a8",func-name="_ZN11WvSemaphoreC1Ej
",offset="20",inst="\
call 0x460960 <pthread_mutex_init>"},{address="0x004232ad",func-name="_ZN11WvS
emaphoreC1Ej",offset\
="25",inst="movl $0x0,0x4(%esp)"},{address="0x004232b5",func-name="_ZN11WvSema
phoreC1Ej",offset="3\
3",inst="mov 0x8(%ebp),%eax"},{address="0x004232b8",func-name="_ZN11WvSemapho
reC1Ej",offset="36",\
inst="add $0x4,%eax"},{address="0x004232bb",func-name="_ZN11WvSemaphoreC1Ej",
offset="39",inst="mo\
v %eax,(%esp)"},{address="0x004232be",func-name="_ZN11WvSemaphoreC1Ej",offset
="42",inst="call   0\
x4609e0 <pthread_cond_init>"},{address="0x004232c3",func-name="_ZN11WvSemaphoreC
1Ej",offset="47",ins\
t="movl $0x0,0x4(%esp)"},{address="0x004232cb",func-name="_ZN11WvSemaphoreC1Ej
",offset="55",inst="\
mov 0x8(%ebp),%eax"},{address="0x004232ce",func-name="_ZN11WvSemaphoreC1Ej",o
ffset="58",inst="add\
$0x8,%eax"},{address="0x004232d1",func-name="_ZN11WvSemaphoreC1Ej",offset="6
1",inst="mov    %eax\
,(%esp)"},{address="0x004232d4",func-name="_ZN11WvSemaphoreC1Ej",offset="64",ins
t="call   0x4609e0 <\
pthread_cond_init>"},{address="0x004232d9",func-name="_ZN11WvSemaphoreC1Ej",offs
et="69",inst="mov   \
0x8(%ebp),%edx"},{address="0x004232dc",func-name="_ZN11WvSemaphoreC1Ej",offset=
"72",inst="mov    0x\
c(%ebp),%eax"},{address="0x004232df",func-name="_ZN11WvSemaphoreC1Ej",offset="75
",inst="mov    %eax,\
0xc(%edx)"},{address="0x004232e2",func-name="_ZN11WvSemaphoreC1Ej",offset="78",i
nst="mov    0x8(%ebp\
),%edx"},{address="0x004232e5",func-name="_ZN11WvSemaphoreC1Ej",offset="81",inst
="mov    0x8(%ebp),%\
eax"},{address="0x004232e8",func-name="_ZN11WvSemaphoreC1Ej",offset="84",inst="m
ovl   $0x0,0x14(%eax\
)"},{address="0x004232ef",func-name="_ZN11WvSemaphoreC1Ej",offset="91",inst="mov
l   $0x0,0x10(%edx)"\
},{address="0x004232f6",func-name="_ZN11WvSemaphoreC1Ej",offset="98",inst="leave
 "},{address="0x004\
232f7",func-name="_ZN11WvSemaphoreC1Ej",offset="99",inst="ret "},{address="0x
004232f8",func-name=\
"_ZN11WvSemaphoreD2Ev",offset="0",inst="push %ebp"},{address="0x004232f9",func
-name="_ZN11WvSemaph\
oreD2Ev",offset="1",inst="mov %esp,%ebp"},{address="0x004232fb",func-name="_Z
N11WvSemaphoreD2Ev",\
offset="3",inst="sub    $0x8,%esp"}]
[1,144,342,498,586] (gdb)
[1,144,342,533,535] 138-exec-step 1
[1,144,342,533,550] 138^running
[1,144,342,533,550] (gdb)

-------------------------------------------------------------------------------------------------------------------------------------------
From: "Mikhail Khodjaiants" <mikhailk@xxxxxxx>
Reply-To: CDT Debug developers list <cdt-debug-dev@xxxxxxxxxxx>
To: "CDT Debug developers list" <cdt-debug-dev@xxxxxxxxxxx>
Subject: Re: [cdt-debug-dev] Execution lost in pthread while debuggingwithCygwin GDB
Date: Thu, 6 Apr 2006 11:50:56 -0400

Sudhan,

Try to reproduce the same sequence from the command line or get the gdb trace (see CDT Debugger FAQ #5). I don't see anything wrong with the CDT debugger, it seems that your program is blocked.

Mikhail
----- Original Message ----- From: "Sudhan Kayarkar" <sudhank@xxxxxxxxxxx>
To: <cdt-debug-dev@xxxxxxxxxxx>
Sent: Thursday, April 06, 2006 11:33 AM
Subject: Re: [cdt-debug-dev] Execution lost in pthread while debugging withCygwin GDB


Mikhail ,

What I mean is that I can step through the code until it reaches here -

pthread_mutexattr_t attr;

=> pthread_mutexattr_init(&attr);

At the line where the pthread_mutexattr_init routine is called, if I do
a
Step Over or Step Into or Run (with a breakpoint on the next line) the
debugger doesn't return and the execution just seems to get lost. The
only
thing I can do is suspend or terminate. The Debug window shows 2 threads
-
the status of this one is 'Stepping' and the status of the other is
'Running'.

The error log does not generate any message when this happens.

Thanks,
Sudhan


From: "Mikhail Khodjaiants" <mikhailk@xxxxxxx>
Reply-To: CDT Debug developers list <cdt-debug-dev@xxxxxxxxxxx>
To: "CDT Debug developers list" <cdt-debug-dev@xxxxxxxxxxx>
Subject: Re: [cdt-debug-dev] Execution lost in pthread while debugging
withCygwin GDB Date: Wed, 5 Apr 2006 17:27:45 -0400

What do you mean by "control does not return to the debugger"? Is the
session in the running state? Check the error log.

----- Original Message ----- From: "Sudhan Kayarkar"
<sudhank@xxxxxxxxxxx>
To: <cdt-debug-dev@xxxxxxxxxxx>
Sent: Wednesday, April 05, 2006 5:06 PM
Subject: [cdt-debug-dev] Execution lost in pthread while debugging with

Cygwin GDB


I have a multi threaded project executable built using g++ that runs
fine
from command line or Windows double click.
However, when I try to debug using Cygwin GDB the execution gets lost
when a
call to pthread_mutexattr_init is made i.e. control does not return to
the
debugger.

The point at which this happens is NOT the first time that this
pthread
function is invoked. There are earlier invocations of this function
that

execute fine.

Any clues about what might be happening or how this issue can be root
caused
?
Thanks,
Sudhan


_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev

_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev


_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev

_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev




Back to the top