NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: ad on May 09, 2010, 08:47:46 PM

Title: gdb debug symbols for nasm
Post by: ad 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





 
Title: Re: gdb debug symbols for nasm
Post by: tenim on May 10, 2010, 11:03:32 AM

./nasm -g -f  macho32 -l hello.lst hello.asm
Title: Re: gdb debug symbols for nasm
Post by: ad 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


Title: Re: gdb debug symbols for nasm
Post by: Keith Kanios on May 10, 2010, 06:41:07 PM
See this thread (http://forum.nasm.us/index.php?topic=651.0).