This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

threads/2292: GDB process stops when debugging threaded program


>Number:         2292
>Category:       threads
>Synopsis:       GDB process stops when debugging threaded program
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 28 00:08:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Oleg V. Zhylin <vz@yahoo.com>
>Release:        GDB CVS 2007-7-27
>Organization:
>Environment:
Fedora Core 7
>Description:
The attached program makes GDB itself stop when run.
>How-To-Repeat:
Hi Jim,

  pthread_test.cpp demonstrates the problematic behavior. It is built
using

 g++ -g pthread_test.cpp -lpthread

 The version numbers are

$ cat /proc/version
Linux version 2.6.21-1.3228.fc7
(kojibuilder@xenbuilder2.fedora.redhat.com) (gcc version 4.1.2 20070502
(Red Hat 4.1.2-12)) #1 SMP Tue Jun 12 15:37:31 EDT 2007

and gdb snapshot for July 24th

$ gdb --version
GNU gdb 6.6.50.20070724

Below is the log of gdb session

$ gdb a.out
GNU gdb 6.6.50.20070724
Copyright (C) 2007 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /home/cartcs/Work/gdb/pthread_create/a.out
[Thread debugging using libthread_db enabled]
[New Thread 0xb7f336d0 (LWP 22251)]

[3]+  Stopped                 gdb a.out
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="pthread_test.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="pthread_test.cpp"

I2luY2x1ZGUgPHB0aHJlYWQuaD4NCiNpbmNsdWRlIDxzeXMvdGltZS5oPgoNCnZvaWQgU2xlZXAo
dW5zaWduZWQgbG9uZyB1bE1pbGxpc2Vjb25kcykNCnsNCiAgICBzdHJ1Y3QgdGltZXZhbCB0aW1l
b3V0Ow0KICAgIHRpbWVvdXQudHZfc2VjID0gMDsNCiAgICB0aW1lb3V0LnR2X3VzZWMgPSB1bE1p
bGxpc2Vjb25kcyAqIDEwMDA7DQogICAgc2VsZWN0KDEsIE5VTEwsIE5VTEwsIE5VTEwsICZ0aW1l
b3V0KTsNCn0gDQoNCnN0YXRpYyB2b2lkKiB0aHJlYWRGdW5jKCB2b2lkKiBscFBhcmFtICkgDQp7
DQogICBTbGVlcCgzMDAwKTsNCn0NCg0KaW50IG1haW4oKQ0Kew0KICBwdGhyZWFkX2F0dHJfdCBh
dHRyOw0KDQogIGludAkJbjsNCiAgYm9vbCByZXMgPSBmYWxzZTsNCg0KICBpZiAoIChuID0gOjpw
dGhyZWFkX2F0dHJfaW5pdCgmYXR0cikpICE9IDApDQogIHsNCiAgICByZXR1cm4gLTE7DQogIH0N
CiAgcHRocmVhZF90IHRpZDsNCg0KICBpZiAoIChuID0gOjpwdGhyZWFkX2NyZWF0ZSgmdGlkLCAm
YXR0ciwgdGhyZWFkRnVuYywgMCkpID09IDApDQogIHsNCg0KICAgIHJlcyA9IHRydWU7DQogIH0N
Cg0KICBpZiAoIChuID0gOjpwdGhyZWFkX2F0dHJfZGVzdHJveSgmYXR0cikpICE9IDApDQogIHsN
CiAgICByZXR1cm4gLTI7DQogIH0NCiAgaWYgKCFyZXMpDQogIHsNCiAgICByZXR1cm4gLTM7DQog
IH0NCiAgU2xlZXAoNTAwMCk7DQoNCiAgcmV0dXJuIDA7DQp9Cg==


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]