Operating System - HP-UX
1846863 Members
22997 Online
110256 Solutions
New Discussion

gdb 6.2.1 on HP-UX B.11.11 U

 
Rajesh_80
New Member

gdb 6.2.1 on HP-UX B.11.11 U

Hi,

One of my programs Crashed on the HP-UX 11.11 with the following error message:

Pid 27466 killed due to trashed stack.

Pid 27466 was killed due to failure in writing the signal context.

It also gave a core-dump. When I tried to analyse the core-dump with gdb-6.2.1 the gdb is giving the message "Memory fault(coredump" and it quits as follows:

# gdb -c core
GNU gdb 6.2.1
Copyright 2004 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 "hppa64-hp-hpux11.11".
Memory fault(coredump)
#


Could anyone please tell me why the gdb is not able to analyse the core file. And also would appreciate if anyone can guide me on how to debug the "core" file.
9 REPLIES 9
Muthukumar_5
Honored Contributor

Re: gdb 6.2.1 on HP-UX B.11.11 U

You have to start gdb for debugging core file as,

# gdb
gdb) bt

Before that check as,

# file core
# what core
# what
# what

It has to be compatible with gdb file type to make operation.


for more informations.

hth.
Easy to suggest when don't know about the problem!
VEL_1
Valued Contributor
Arunvijai_4
Honored Contributor

Re: gdb 6.2.1 on HP-UX B.11.11 U

You can try the follwing,

# gdb program core
# gdb program
# file core
# what core
# tusc program

tusc is a very handy utility in HP11.11 for analysing system calls,
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/tusc-7.7/

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: gdb 6.2.1 on HP-UX B.11.11 U

Raj,

Thanks for pointing.

I was writing some document for core file analysis long back.

http://geocities.com/kmuthu_gct/core_analysis.html

==

Rajesh,

This problem is seeming to be application vs gdb compatiblity. I was getting same type or errors with older gdb's

hth.
Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: gdb 6.2.1 on HP-UX B.11.11 U

You can try with HP WDB. Download from,
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,1662,00.html

HP has done paltform specific changes in GDB and it is known as WDB, HP supports WDB.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: gdb 6.2.1 on HP-UX B.11.11 U

Check this:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=875475

It is a problem with gdb build.

hth.
Easy to suggest when don't know about the problem!
VEL_1
Valued Contributor

Re: gdb 6.2.1 on HP-UX B.11.11 U

Muthukumar,

Its good to write. But plenty of docs available in web. See the following link. Its really good.

http://www.dirac.org/linux/gdb/

Rajesh,

you can use the strace system utility also to trace the system calls.

Thanks.

Arunvijai_4
Honored Contributor

Re: gdb 6.2.1 on HP-UX B.11.11 U

H.Merijn Brand (procura
Honored Contributor

Re: gdb 6.2.1 on HP-UX B.11.11 U

a core dump from a 64bit applic should be debugged with a 64bit gdb, as a 32bit core should be debugged with a 32bit gdb

If your core was a 64bit dump, try to see if you have gdb64

My most recent gcc ports for HP-UX 11.11 contain gdb-6.3 for 32 AND 64 bit env:

http://mirrors.develooper.com/hpux/gcc-3.4.4-11.11.sd.bz
http://mirrors.develooper.com/hpux/gcc-4.0.1-11.11.sd.bz

I'm having trouble with 4.0.1 in 64bit, so if you want to play safe, use the 3.4.4 build

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn