1833029 Members
2358 Online
110049 Solutions
New Discussion

HP debuggers

 
SOLVED
Go to solution
Ian Cattrell
Occasional Contributor

HP debuggers

I am currently trying to resolve a problem with an application where one of the processes hangs. There doesn't appear to be any particular circumstances where the hang happens and attempts to reproduce it are yet to be successful. Running the process with debug isn't an option beacuse of the perfomance hit on the application.

My two questions are :

1. Is there any way other, than a kill -3 which doesn't work in this case, to force the process to exit and produce a core file for later analysis.

2. Does anybody have any recommendations for debuggers that would allow me to attach to the hung process and look at memory/registers etc.

Thanks in advance

Ian
3 REPLIES 3
Alex Glennie
Honored Contributor

Re: HP debuggers

It could be a case that kill -3 kills the thread but not the process perhaps ? try following it up with another couple of kill -3's.

If that fails kill -6 or a kill -9 ?

As to Qu 2 await the advise of a Programming guru or check out :

http://devresource.hp.com/devresource/Tools/wdb/doc/index.html

Carlos Fernandez Riera
Honored Contributor

Re: HP debuggers

Before debuggers may be of your interest 'tusc'. tusc is tracer for system calls.

Search on forums for more info.
unsupported
Andy Bennett
Valued Contributor
Solution

Re: HP debuggers

Qu 1:

A kill -3 sends SIGQUIT to the application which is a bit like doing a Ctrl-C on it. You need to find a signal that the application has no handler for, and produces a core file (see man 5 signal for a description of the default signal outcomes). 'kill -SIGABRT' is commonly used, 'kill -SIGSEGV' or 'kill -SIGBUS' are another two possibilities since few applications have handlers for them unless they are doing their own memory management or they trap all signals.

Qu 2:

The site Alex pointed you to has a download for HP's latest debugger WDB version 2.1. You can use this in two ways, either as gdb (based on GNU's distribution) or wdb (HP's custom GUI on top of gdb).

The other debugger on most HP development systems is dde (available on applications media only).

In both the debuggers' cases, they can attach to running processes (see their man pages) or can run programs with or without debugging information in them since both are capable to tracing at an assembly language level.