NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started 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
-
./nasm -g -f macho32 -l hello.lst hello.asm
-
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
-
See this thread (http://forum.nasm.us/index.php?topic=651.0).