PDB file generation

Tom Kacvinsky tkacvins@gmail.com
Sat May 27 10:49:03 GMT 2023


On Wed, May 10, 2023 at 7:00 AM Nick Clifton <nickc@redhat.com> wrote:

> 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 ?
>
>
I can make a BZ and attach the PDB files as generated by the Visual Studio
tool chain and the latest release binutils and GCC 12.1.0.  I don't know the
ins and outs of PDB dumps to understand the differences.

Maybe Mark Harmstone can chime in.


> 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...)
>

I can try with clang generated PDB files to see if debugging works,  I will
do
this after I get back from vacation.

Tom


More information about the Binutils mailing list