Using the gdb32/64 debugger on Intanium HPUX 11.11

Posted on 2006-04-06
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.
Question by:GeekMan
    LVL 51

    Expert Comment

    > 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 Comment

    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.
    LVL 51

    Accepted Solution

    sometimes a simple
      strings core
    also helps ...
    LVL 27

    Assisted Solution

    Running gdb specially for backtraces:

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

    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).
    LVL 3

    Assisted Solution

    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).

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    This video discusses moving either the default database or any database to a new volume.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now