1

I am aware of this question, but I don't understand the only answer given.

How do I tell OllyDbg where the source code is when I have no PDB file (debug symbols) available?

0xC0000022L
  • 10,908
  • 9
  • 41
  • 79
  • 2
    i just commented in the linked Q before seeing this question so to reiterate you cant tell any debugger to use source without having debug symbol information with sourceline information included (pdb for windows compilers and dwarf for gcc compilers) – blabb Jul 26 '18 at 20:54
  • Ah, I think I see. So, I would somehow have to convince Vectorcast, which creates the .EXE to do so and also generate a .PDB? Feel free to post that as an answer, and I will accept it (and, possibly, open another question elsewhere asking how to do so). Thanks – Mawg says reinstate Monica Jul 26 '18 at 21:04

2 Answers2

3

You cannot tell Ollydbg or for that matter any debugger where source code is without having Debug Information.

The Source Line information is available only in the Debug Information File.

  • with msvc compiler chain it is Program Database File aka PDB
  • with gcc compiler chains it is called dwarf

As far as I know gcc when built with -g option embeds the Debug Information inside the Executable itself (you may need strip to strip the debug info from the binary).

But msvc with /Zi switch always creates a separate pdb file. You can use the binplace or pdbcopy utility to selectively strip Debug Information from this pdb file.

I googled vectorcast and it seems to be a software testing suite and its site says it is compatible with MSVC tool chain up to Visual Studio 2013.

Debuggers Supported by Vectorcast

blabb
  • 16,376
  • 1
  • 15
  • 30
0

OllDbg is a Windows tool and thus using a windows library dbghelp.dll to do the debugging work. You can tell that by listing Olly's dlls:

enter image description here

And dbghelp.dll uses symbol files to link the binary information with the source code.

Thus you tell OllyDbg where the source code is by using the PDB file. PDB is what links your binary file with your source code.

The following excerpt still holds - Specify symbol (.pdb) and source files in the Visual Studio debugger:

A program database (.pdb) file, also called a symbol file, maps the identifiers that you create in source code for classes, methods, and other code to the identifiers that are used in the compiled executables of your project. The .pdb file also maps the statements in the source code to the execution instructions in the executables. The debugger uses this information to determine two key pieces of information:

  • Name of the source file and line number to be displayed in the Visual Studio IDE
  • Location in the executable to stop at when you set a breakpoint

A symbol file also contains the original location of the source files, and optionally, the location of a source server where the source files can be retrieved from.

Paweł Łukasik
  • 4,912
  • 1
  • 14
  • 27