From: David Abrahams (dave_at_[hidden])
Date: 2004-12-14 12:20:53
> With MSVC (and Intel on Windows), .PDB files are essential to
> debugging. This is not just for debug builds but for release builds
> With the boost build system a PDB file will be generated when:
> Without a .PDB the generated images cannot be debugged either for a
> live process or a .DMP file (like a unix core file). Microsoft has
> wisely with VS7 (Visual Studio 7 / .NET) and above made generation
> of .PDB files the default for both release and debug builds (it was
> not default for VS6).
> If <debug-store> is set to 'object' then the debugging information is
> built into the library files (static and dynamic link). This bloats
> dynamic link libraries, and is thus not the preferred mechanism for
> dynamic link libraries, but is still very good for static link.
> It is my firm belief that software (inc boost) when built with MSVC
> (or Intel on Windows) should always generate debugging information.
But that means some people pay for something they don't use. Both in
space and in compilation time.
> Since the .PDB is a separate file it does not bloat the generated
> executable image and is not typically shipped. An experienced
> developer is likely to turn debug symbols on, but the defaults should
> cater for the inexperienced too. It is not practical to generate
> a .PDB only after a crash because the MS linker uses GUIDs in the
> image and the .PDB.
I don't have a strong opinion about what the default should be, but I do
feel strongly that you shouild be able to turn this feature off.
> The default place to install a .PDB file is the libdir (see
> C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib).
That'll never fly; we'll get collisions all over the place.
> Microsoft they place .PDB files for static links into the libdir and
> allow you to download the .PDB files for dynamic links from their
> symbols server.
> I would like to propose that the boost build for at least MSVC and
> Intel on Windows do the following:
> variant release
> # <debug-store> database for dynamic link - research pending for
> static link
> I don't know enough about the downsides on platforms other than
> Microsoft (e.g. executable image bloat due to a .debug section), but
> <debug-symbols>on might be suitable for variant common.
> For the install and stage rules.
> For static link the generated .PDB files should be installed to
> For dynamic link the generated .PDB files should be installed to
what are libdir and bindir?
> The install and staging should be conditional on <debug-symbols>on
> Changing the install and stage rules I expect to be more difficult
> and thus more important as it is easy to set <debug-symbols>on.
> Andreas Huber raised a similar point (on Nov 9 2004)
> and Vladimir Prus gave a good reply but my proposal is to change the
> default way the boost builds with MSVC (which is different to what
> Andreas asked).
> I am hoping that one of the build experts will reply, and agree to
> update the build rules.
We're trying to retire BBv1, so it will be for BBv2 I think.
> If the experts agree I'll research the issues
> between using /Zi and /Z7 for static link libraries so that boost can
> default to the best (if there is one).
All I can say is that in order to pick the BBv1 behaviors I consulted
with a Microsoft compiler engineer. I suggest that we mimic those
choices in BBv2.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
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