🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #2539

gdb 5.1.1 runtime error (on HPUX11.0)

#2539
From: Scott Zetlan
Date: Thu, 14 Mar 2002 19:50
32 lines
2606 bytes
I'm getting an odd runtime error from gdb 5.1.1 which I compiled under HP-UX
11.00.  Here's the banner from gdb when it starts up:

GNU gdb 5.1.1
Copyright 2002 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 "hppa2.0w-hp-hpux11.00".

I've been building in a separate directory from the code, and my configure
line looks like:
/home/szetlan/.../configure --prefix=/home/szetlan/binutil

Here's the problem: gdb starts just fine, but then when I attempt to run a
program, it hangs.  I've gotten a core dump from gdb, which I traced with
gdb, and found that it's hanging at add_thread (thread.c) called from
child_acknowledge_created_inferior (infttrace.c).

It appears that child...inferior () accepts an int (int pid) as an argument,
and then passes that int to add_thread (line 3126).  The add_thread()
function actually takes a ptid_t (typdef'd in def.h as a struct ptid) as an
argument.  My core dump shows that gdb is attempting to access memory at
0x3d4, which evaluates to 980, or the pid of the child process.

I've been able to build the same code just fine under Solaris.  So... any
ideas what I'm missing?  The only other major difference I can see is that
on HP, I'm running gcc 3.0, and on Solaris, I've got 3.0.4.

Scott
Technical Details
Message-ID: <NFBBLMGMGLFHMBPLHKFIMENDCBAA.scottzetlan@aol.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!news-hub.siol.net!ams.uu.net!zur.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdb

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,b0f57ce62e078781,start
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 2002-03-14 11:50:41 PST
x-uunet-gateway: mr1.ash.ops.us.uu.net from bug-gdb to gnu.gdb.bug; Thu, 14 Mar 2002 19:50:39 GMT
From: "Scott Zetlan" <scottzetlan@aol.com>
Subject: gdb 5.1.1 runtime error (on HPUX11.0)
Date: Thu, 14 Mar 2002 14:50:27 -0500
Message-ID: <NFBBLMGMGLFHMBPLHKFIMENDCBAA.scottzetlan@aol.com>
MIME-Version: 1.0
Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Approved: bug-gdb-request@mail.gnu.org
Newsgroups: gnu.gdb.bug
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!news-hub.siol.net!ams.uu.net!zur.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdb
Sender: bug-gdb-request@mail.gnu.org
Lines: 33