1827584 Members
2739 Online
109965 Solutions
New Discussion

Re: gdb on HP-UX

 
Sean Shen
New Member

gdb on HP-UX

I was using gdb 5.1.1 on HP-UX 11.00. Even with the most simple hello.cpp program, gdb hangs. The detailed steps are:
$gdb hello
GNU gdb 5.1.1
.....
(gdb)run
Starting program .../hello

Then the process stays there forever.

Any suggestion and hint are appretiated.

Sean
3 REPLIES 3
Olav Baadsvik
Esteemed Contributor

Re: gdb on HP-UX

Hi,

See if you have /opt/langtools/bin/gdb
It is the gdb that comes with the HP compilers

/opt/langtools/bin/wdb is a gui to gdb
that works very well.

Regards
Olav
Steven Gillard_2
Honored Contributor

Re: gdb on HP-UX

I've seen this exact same problem on HPUX 11.0. In our case it only occurred when running gdb with a different shell (zsh), but with POSIX shell or ksh everything worked fine. Are you running a different shell? If so, you can try exporting the SHELL environment variable to /usr/bin/sh before running gdb and that should take care of it (at least it did in our case).

The problem is actually caused by a bug in the way HPUX handles signals in certain traced processes - some signals would be lost and hence if a process blocked waiting on this signal it would hang. I'm told its fixed in 11i, but I don't think there's a patch for 11.0.

Regards,
Steve
Thomas Martin_3
Occasional Advisor

Re: gdb on HP-UX

I have exactly the same problem - gdb (precompiled version 5.1.1) hangs when I try to r(un) my programs. I am experiencing problem on a B180L running HPUX 11.0 and on a 735/125 running 10.20.

I usually use bash, but I also tried to run gdb under sh and ksh with the same results.

I would be thrilled to get the problem solved.

Thanks in advance!