Author Topic: gdb debug symbols for nasm  (Read 20395 times)

Offline ad

  • Jr. Member
  • *
  • Posts: 6
gdb debug symbols for nasm
« on: May 09, 2010, 08:47:46 PM »
Hello,

I am trying to learn assembly language on my mac osx (snow lepord), but not getting debug symbol for gdb. Are debug symbols supported for mach032 for nasm version 2.08.01? Below are the step used, what am I missing? (which debug format should be used?)

Thanks
Ajit

1. compile simple hello.asm

./nasm -f  macho32 -l hello.lst hello.asm

2. link using gcc

gcc -m32 -o hello hello.o


3. debug using gdb
gdb hello





 

Offline tenim

  • Jr. Member
  • *
  • Posts: 3
Re: gdb debug symbols for nasm
« Reply #1 on: May 10, 2010, 11:03:32 AM »

./nasm -g -f  macho32 -l hello.lst hello.asm

Offline ad

  • Jr. Member
  • *
  • Posts: 6
Re: gdb debug symbols for nasm
« Reply #2 on: May 10, 2010, 11:41:54 AM »
Thanks for your response, already tried that, but -g does not work as expected.

As far as I can tell, it not supported, based on below;

If so, does anyone know when this will get fixed?

$ nasm -f macho -y

valid debug formats for 'macho' output format are ('*' denotes default):
  * null      Null debug format

2.1.26 The ?y Option: Display Available Debug Info Formats

Typing nasm ?f <option> ?y will display a list of the available debug info formats for the given output
format. The default format is indicated by an asterisk. For example:
nasm ?f elf ?y
valid debug formats for โ€™elf32โ€™ output format are (โ€™*โ€™ denotes default): * stabs   ELF32 (i386) stabs debug format for Linux
dwarf   elf32 (i386) dwarf debug format for Linux



Offline Keith Kanios

  • Full Member
  • **
  • Posts: 383
  • Country: us
    • Personal Homepage
Re: gdb debug symbols for nasm
« Reply #3 on: May 10, 2010, 06:41:07 PM »