debug question - Unix

This is a discussion on debug question - Unix ; how to find if a binary has debug symbols in it....

+ Reply to Thread
Results 1 to 4 of 4

Thread: debug question

  1. debug question

    how to find if a binary has debug symbols in it.

  2. Re: debug question

    sinbad wrote:
    > how to find if a binary has debug symbols in it.


    That may depend a lot on the system you're on. The obvious
    test (which should work everywhere) is to load it into your
    debugger. It will rather likely tell you if it found debug-
    ging symbols. Another method that may work is to call the
    'file' program on the executable. If it tells you something
    about it being "stripped" than there aren't debugging infor-
    mations in the program, but if it tells you "not stripped"
    there are probably some.
    Regards, Jens
    --
    \ Jens Thoms Toerring ___ jt@toerring.de
    \__________________________ http://toerring.de

  3. Re: debug question

    On May 29, 10:57 pm, sinbad wrote:
    > how to find if a binary has debug symbols in it.


    You can try running: objdump with the --syms options and see what it
    prints out. This should print out the symbols which i am guessing
    will be not meaningful if you compiled without debug symbols.

    Ivan Novick

  4. Re: debug question

    I didn't get the objdump --syms part. objdump dumps the symbol table
    irrespective of whether it contains debugging symbols or not.
    I think the simplest way is to load the file into debugger.
    Say:
    gdb a.out
    Either it will load the file for debugging or will say that no
    debugging symbols found.

+ Reply to Thread