Author Topic: How do I generate correct debugging info?  (Read 12695 times)

Offline ben321

  • Full Member
  • **
  • Posts: 185
How do I generate correct debugging info?
« 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.
« Last Edit: January 16, 2019, 03:19:02 AM by ben321 »

Offline sonictk

  • Jr. Member
  • *
  • Posts: 5
Re: How do I generate correct debugging info?
« Reply #1 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