Operating System - HP-UX
1833613 Members
3587 Online
110062 Solutions
New Discussion

Re: Memory Debuggers for HP-UX B.11.11 OS

 
Katherine Pak
New Member

Memory Debuggers for HP-UX B.11.11 OS

Has anyone been able to successfully implement a memory debugger on an HP-UX B 11.11?

I was unable to get any of the following open source memory debuggers to build on the HP-UX 11.11: mpatrol 1.4.8, njamd 0.9.3, Fortify 2.2, Electric Fence 2.1.13, and dmalloc 5.4.2

Any proven solutions out there that would work on 11.11 ?

Thanks,
Katherine
10 REPLIES 10
Ivan Krastev
Honored Contributor

Re: Memory Debuggers for HP-UX B.11.11 OS

Hi Katherine,

dmalloc is available at - http://hpux.connect.org.uk/hppd/hpux/Users/dmalloc-5.4.2/


regards,
ivan
Dennis Handly
Acclaimed Contributor

Re: Memory Debuggers for HP-UX B.11.11 OS

Have you tried wdb? You can download from:
http://www.hp.com/go/wdb
Katherine Pak
New Member

Re: Memory Debuggers for HP-UX B.11.11 OS

Thanks for the link, Ivan. However, when I try to link I get the following linker error:

/usr/ccs/bin/ld: Invalid loader fixup in text space needed in output file for symbol "dmalloc_shutdown" in input file "/home/myself/dmalloc/dmalloc-RUN/usr/local/lib/libdmallocxx.a(malloc.o)"
collect2: ld returned 1 exit status
gmake: *** [libMySharedLib.sl] Error 1

I chose the HP-UX 11i, v1 (HP-UX 11.11), which seems to be a binary distribution. I am using gcc 3.3.3; cannot find which gcc version was used to create the above binaries. So I may need to download the HP-UX sources and recreate the shared libs? I am hoping the source code from this site will have taken care of the bugs I ran into building from the package I downloaded from dmalloc's site.



--------------------------
Hi Katherine,

dmalloc is available at - http://hpux.connect.org.uk/hppd/hpux/Users/dmalloc-5.4.2/


regards,
ivan
Katherine Pak
New Member

Re: Memory Debuggers for HP-UX B.11.11 OS

Thanks for the link, Dennis.

I did download the wdb and its gui bundle. From the docs it indicates that it
is compatible with C++ code compiled with aCC--no mention of g++-compiled source?
Our sources are compiled with gcc 3.3.3.

I am reading the docs that are not all that helpful. There does not appear to be much to
the installation than adding to $PATH. The executables do not seem to work yet. I will
keep reading up though it does not look too promising right now.

=================================
Have you tried wdb? You can download from:
http://www.hp.com/go/wdb
Dennis Handly
Acclaimed Contributor

Re: Memory Debuggers for HP-UX B.11.11 OS

>/usr/ccs/bin/ld: Invalid loader fixup in text space needed in output file for symbol "dmalloc_shutdown" in input file

This indicates a bug in gcc. You may be able to work around the problem by removing "const" from the symbol that is taking the address of dmalloc_shutdown.

>From the docs it indicates that it
is compatible with C++ code compiled with aCC--no mention of g++-compiled source?
Our sources are compiled with gcc 3.3.3.

If it doesn't work for g++, it should at least track the malloc/free calls.

>I am reading the docs that are not all that helpful. There does not appear to be much to
the installation than adding to $PATH. The executables do not seem to work yet.

What info is missing? Which executables don't work, yours? How do they fail?

>I will keep reading up though it does not look too promising right now.

What doesn't look promising?
sassan
New Member

Re: Memory Debuggers for HP-UX B.11.11 OS

Assuming your applications are built by aCC (HP C or C++ compilers), you can try the memory debugging feature in WDB, HP's enhanced GDB.

You can download WDB from:
hp.com/go/wdb
and read the "Debugging Memory Problems" section (page 123) in the user guide under:
http://h21007.www2.hp.com/dspp/files/unprotected/devresource/Tools/wdb/doc/gdb.pdf
Katherine Pak
New Member

Re: Memory Debuggers for HP-UX B.11.11 OS

In response to Dennis' last post:

(1) On the dmalloc: So then in order to implement the workaround, I would need to download the source (from HP) and recompile with the modifications?

(2) I downloaded the wdb bundle and unpacked in my local $HOME dir. I added the following to $PATH:

$HOME/wdb/WDB/WDB/opt/langtools/bin/.
$HOME/wdb/WDB-GUI/WDB-GUI-RUN/opt/langtools/bin

When I try to execute wdb I get a: "cannot execute binary file". Does this need to be installed somewhere in order to run it? If so, where? There is not much written in the docs on installation.

I tried to execute with the following: (from xterm):

gdb a.out
$HOME/wdb/WDB/WDB/opt/langtools/bin/vdb a.out

"cannot execute binary file"

Carl Burch
New Member

Re: Memory Debuggers for HP-UX B.11.11 OS


The "HP WDB installation guidelines" are at:
http://h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,9305,00.html

The files you download aren't tarballs (other than the source tarball, which is labelled as a tarball), they're gzipped software depots - which have to be installed with the swinstall tool. This is all described at the link above.

- Carl Burch
HP WDB Team
Katherine Pak
New Member

Re: Memory Debuggers for HP-UX B.11.11 OS

We now have wdb swinstalled. Despite the wdb docs which state that it only supports aCC-compiled C++ code, wdb seems to find the g++-compiled source. I am going to keep playing around with it, try to tap into the memory debug features. The UI is very nice.

Thanks, everyone, for your inputs!
Katherine
Carl Burch
New Member

Re: Memory Debuggers for HP-UX B.11.11 OS

Katherine-

That's good news! If you have further questions about WDB, you can mail the project team direct at wdb-help@cup.hp.com.

- Carl Burch
HP WDB Team