PDB file generation

Nick Clifton nickc@redhat.com
Wed May 10 11:59:43 GMT 2023


Hi Tom,

> I am compiling a simple hello world program as follows
> 
> gcc -g -o hello hello.c -Wl,--pdb=hello.pdb
> 
> Yet when I run the resulting executable under the Visual Studio debugger,
> setting a breakpoint on main, I do break on main, but there the debugger
> tells me there is no source information in the debug information.
> 
> Am I missing something?

[I was hoping that someone else would respond to this email, since I know
nothing about the PDB format...]

If you examine the hello.pdb file's contents, does that give any clues
as to what is wrong ?

If you generate a hello.pdb file using Microsoft's own tools and then compare
it to the one generated by the binutils linker, are there any obvious differences ?

If you use the lld linker from the LLVM project, does that produce a
working pdb file ?  (not sure if lld actually supports such an option,
but it might...)

Cheers
   Nick






More information about the Binutils mailing list