Boost logo

Boost-Build :

From: Anichini, Steve (Sanichini_at_[hidden])
Date: 2002-03-14 12:55:41


The compiler switch you want is /Fd (name of PDB file)

This will allow you to specify the filename for what defaults to vc60.pdb
(and vc60.idb) from the compiler. Although why microsoft chose not to bump
the version numbers on those defaults for vs.net is a mystery to me.

Here's my theories on how the PDB stuff all works:

1) the vc60.pdb files are only used as intermediate files for the debug
info. The compiler dumps the debug info it generates into the pdb, and the
linker and library manager use this debug info file when they create the
lib/exe/dll. In the case of a library, I believe the debug info is encoded
into the library file itself. With exe/dll's, given default linker options,
a separate pdb file is created usually named <exe_name>.pdb in the same
directory as the exe/dll output.

>From Visual C++ docs:

"Object (.OBJ) files compiled using the /Zi option contain the name of a
program database (PDB). You do not specify the object’s PDB file name to the
linker; LINK uses the embedded name to find the PDB if it is needed. This
also applies to debuggable objects contained in a library; the PDB for a
debuggable library must be available to the linker along with the library.

LINK also uses a PDB to hold debugging information for the .EXE file or .DLL
file. The program’s PDB is both an output file and an input file, because
LINK updates the PDB when it rebuilds the program."

2) The linker and library manager find the vc60.pdb file because the path to
it is encoded into the OBJ files.

The same actually goes for PDB's for exe/dlls - the path to the PDB is
encoded, but the debugger will also search the same directory as the exe/dll
if the PDB is not found in the encoded path.

-steve

> -----Original Message-----
> From: David Abrahams [mailto:david.abrahams_at_[hidden]]
> Sent: Thursday, March 14, 2002 11:27 AM
> To: jamboost_at_[hidden]
> Cc: Jason Shirk
> Subject: Re: [jamboost] Re: PDB problems with MSVC 6/7
>
>
>
> ----- Original Message -----
> From: "hugo_duncan" <hugo_duncan_at_[hidden]>
>
>
> > --- In jamboost_at_y..., "David Abrahams" <david.abrahams_at_r...> wrote:
> >
> > > Okay, but I want more than that. I'll be supplying a separate
> > > vc7-tools.jam file which allows you to compile with both in one
> build
> > > invocation.
> > Excellent!
> >
> > > .pdb file, is there some way to merge the .pdbs from the
> intermediate
> > > (.lib) targets into the result?
> >
> > As far as I am aware the debugger works with the individual
> pdb files.
>
> How does it find them?
>
>
> To unsubscribe from this group, send an email to:
> jamboost-unsubscribe_at_[hidden]
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk