NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: ben321 on January 16, 2019, 02:58:03 AM

Title: How do I generate correct debugging info?
Post by: ben321 on January 16, 2019, 02:58:03 AM
I want to debug my program I wrote in NASM by using OllyDbg. Without that, OllyDbg does not label the functions by their correct name, and leaves them as unnamed functions. OllyDbg accepts PDB files (the same file type exported by VB6 when it compiles an EXE), which would store the function names, so as to make debugging easier. Does NASM allow the exporting of Visual Basic format PDB files? By the way, PDB means Program Database, if I remember correctly. I'm not sure if it's only a Microsoft thing, or an industry standard format. It contains info to allow debuggers (such as OllyDbg) to keep the names of functions, so that it's easy to see when a particular function is being referenced in the code.
Title: Re: How do I generate correct debugging info?
Post by: sonictk on February 24, 2019, 10:57:54 PM
Hi ben321:

The PDB is generated by the linker. NASM is just an assembler.

I've written a tutorial regarding writing x64 assembly on Windows, where the following section might be of interest to you, since it explains how to generate debug info for debuggers: https://sonictk.github.io/asm_tutorial/#hello,worldrevisted/writingabuildscript