On Thu, Sep 24, 2009 at 12:08:22PM +0100, Edd Barrett wrote:
> Hi,
> 
> Does anyone know the trick to using objdump -g?
> 
> edd% make
> egcc -O0 -g   -o world world.c 
> objdump -dg world > world.dis
> objdump: world: no recognized debugging information
> 
> I tried this on gcc3 and 4. I would really like to use this.

This works for me on OpenBSD-current/amd64:

$ cat >hello.c <<EOF
#include <stdio.h>

int
main(void)
{
        printf("Hello world\n");
        return 0;
}
EOF
$ gcc -gstabs+ -o hello hello.c
$ objdump -g hello | head -n 20
<lots of output>

The gcc info pages has more information about the other formats
supported, but only stabs and stabs+ seem to work with objdump.

                Joachim

  • objdump -g Edd Barrett
    • Re: objdump -g Joachim Schipper

Reply via email to