Debugging symbols with nasm

Joshua Oreman oremanj at
Sat Aug 16 11:13:41 PDT 2003

On Sat, Aug 16, 2003 at 09:14:30AM +0300 or thereabouts, Vladimir Ciobanu wrote:
>   I'm not sure whether this is the best list to post to, but it's my 
> first guess. I'm using nasm to compile some code I wrote. The 
> developer-handbook suggests I use "-f elf", so that's what I did. Then I 
> linked it with ld. The program works as expected, but I can't debug it 
> with gdb; it reports "no debugging symbols found".
>   I've tried to get the possible debugging formats nasm can output, and 
> I get "null" for both elf and aoutb ( ld can't even link aoutb .o files ).
>   Is there a way I could debug my nasm-compiled assembler sources, 
> preferably with gdb ? I don't mind any binary format that can run on 
> FreeBSD, nor any other linker.
>   Any suggestions are welcome.

GDB is just too good for debugging ASM stuff. I recommend ALD, the Assembly
Language Debugger. Install /usr/ports/devel/ald, and run `ald myprogram'.

It doesn't need debug symbols beyond what NASM already provides :-)

-- Josh

More information about the freebsd-questions mailing list