🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #2501

pthreads + execv causes gdb to get confused

#2501
From: Patrick Doyle
Date: Tue, 19 Mar 2002 20:09
29 lines
1896 bytes
Hi.  I hope this is helpful...

When debugging a program that uses pthreads, a call to execv causes
gdb to get mighty confused:

(gdb) run
Starting program: abc
[New Thread 1024 (LWP 8440)]
Breakpoint 2 (...)
736             execvp(argv[0], argv);
(gdb) cont
Continuing.
Cannot find user-level thread for LWP 8445: generic error
(gdb) bt
Cannot find thread 1024: generic error
(gdb) quit
The program is running.  Exit anyway? (y or n) y
Cannot find thread 1024: generic error
(gdb) [5]   Terminated              gdb abc

[6]+  Stopped                 gdb abc
[bash]$ kill %

[6]+  Stopped                 gdb abc
[bash]$
[6]+  Terminated              gdb abc
[bash]$

This is Red Hat 7.2 and GNU gdb 20020225.
Technical Details
Message-ID: <699e3226.0203191209.403ad50e@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!freenix!wanadoo.fr!opentransit.net!news.tele.dk!small.news.tele.dk!62.112.0.25!newsfeed.online.be!zur.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,9a65a43ad455212b,start
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 2002-03-19 12:09:45 PST
x-uunet-gateway: mr1.ash.ops.us.uu.net from bug-gdb to gnu.gdb.bug; Tue, 19 Mar 2002 20:09:43 GMT
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!freenix!wanadoo.fr!opentransit.net!news.tele.dk!small.news.tele.dk!62.112.0.25!newsfeed.online.be!zur.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!not-for-mail
From: doylep@eecg.toronto.edu (Patrick Doyle)
Subject: pthreads + execv causes gdb to get confused
Date: 19 Mar 2002 12:09:35 -0800
Organization: http://groups.google.com/
Message-ID: <699e3226.0203191209.403ad50e@posting.google.com>
NNTP-Posting-Host: 199.246.40.54
Content-Type: text/plain; charset=GB2312
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1016568575 22089 127.0.0.1 (19 Mar 2002 20:09:35 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 19 Mar 2002 20:09:35 GMT
Approved: bug-gdb-request@mail.gnu.org
Newsgroups: gnu.gdb.bug
Sender: bug-gdb-request@mail.gnu.org
Lines: 29