Article View: gnu.gdb.bug
Article #2388Re: pthreads + execv causes gdb to get confused
From: Tauno Voipio
Date: Mon, 25 Mar 2002 18:24
Date: Mon, 25 Mar 2002 18:24
42 lines
2632 bytes
2632 bytes
"Patrick Doyle" <doylep@eecg.toronto.edu> wrote in message news:699e3226.0203191209.403ad50e@posting.google.com... > 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. Just wonder ... What are you trying to achieve? You replace the whole executable (if the exec.. succeeds) and would like to get GDB keeping track of it. Besides, if there are other threads running, they may get confused by the sudden replacement of the whole process code. Tauno Voipio tauno voipio @ iki fi
Technical Details
Message-ID:
<YXJn8.341$So2.49070@read2.inet.fi>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!213.204.128.162!news000.worldonline.se!newsfeed.wirehub.nl!newsfeed.equant.nl!newsfeed.equant.nl!news2.euro.net!uunet!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!not-for-mailReferences:
<699e3226.0203191209.403ad50e@posting.google.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,9a65a43ad455212b
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 2002-03-25 10:26:05 PST
x-uunet-gateway: mr1.ash.ops.us.uu.net from bug-gdb to gnu.gdb.bug; Mon, 25 Mar 2002 18:26:04 GMT
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!213.204.128.162!news000.worldonline.se!newsfeed.wirehub.nl!newsfeed.equant.nl!newsfeed.equant.nl!news2.euro.net!uunet!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!not-for-mail
From: "Tauno Voipio" <tauno.voipio@iki.fi.SPAMBAIT_REMOVE>
References: <699e3226.0203191209.403ad50e@posting.google.com>
Subject: Re: pthreads + execv causes gdb to get confused
MIME-Version: 1.0
Content-Type: text/plain;
charset="GB2312"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <YXJn8.341$So2.49070@read2.inet.fi>
Date: Mon, 25 Mar 2002 18:24:56 GMT
NNTP-Posting-Host: 62.71.251.155
X-Trace: read2.inet.fi 1017080696 62.71.251.155 (Mon, 25 Mar 2002 20:24:56 EET)
NNTP-Posting-Date: Mon, 25 Mar 2002 20:24:56 EET
Organization: Sonera corp Internet services
Approved: bug-gdb-request@mail.gnu.org
Newsgroups: gnu.gdb.bug
Sender: bug-gdb-request@mail.gnu.org
Lines: 43