We help IT Professionals succeed at work.

Using the gdb32/64 debugger on Intanium HPUX 11.11

GeekMan
GeekMan asked
on
Medium Priority
325 Views
Last Modified: 2013-12-26
To give you some perspective, I am not a Unix C programmer. We have a vendor application we run/support on our Itanium Servers that is periodically failing and producing core files. Our vendor says the cores are meaningless unless we produce a stack trace with our debugger and send them the output. We are not familiar with our new tools since switching from TRU64.

We used to run stack traces on our old alphas using decladebug...we have never done this with gdb. I am looking for some examples..proper syntax & necessary parameters... (in fairly simple terms...) on how to produce a stack trace using this new tool.

Any help on this would be appreciated.

Thank You.
Comment
Watch Question

> Our vendor says the cores are meaningless unless we produce a stack trace with our debugger and send them the output.

does your vendor really know what he's talking about?
a UNIX core file contains the stack trace (and much more ...)
if you start the debugger with the corefile, you'll see it

Author

Commented:
Apparently, they can't run a debugger in one environment against a core file from another. Our past experience in TRU64 has been that we take a 600 meg core and the debugger outputs  3-4kb worht of text  that specifically addreses what the problem was with the code.

This little 3-4kb worth of text is what they are wanting now.
sometimes a simple
  strings core
also helps ...

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Artysystem administrator
Top Expert 2007
Commented:
Running gdb specially for backtraces:

gdb /usr/bin/yourprogram /usr/bin/yourprogram.core
bt

that's all.
/usr/bin/yourprogram is executable program, that have failed
/usr/bin/yourprogram.core is a core file
bt is a command of 'gdb' debugger to get a backtrace, please wait while gdb loads core file (it takes time for 600M core).
Not even "bt" is needed
gdb  "exefile" "corefile" will  itself start with call stack.
Even if you are using gdb, if  your exe is not  compiled with -g(which most of the time happens with third party vendors) , you may not get a simple stack(It will be a simple  hexadecimal+ mangled symbols).
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.