BT

Your opinion matters! Please fill in the InfoQ Survey!

Introducing Portable PDB

| by Jonathan Allen Follow 192 Followers on Feb 06, 2017. Estimated reading time: 1 minute |

A note to our readers: As per your request we have developed a set of features that allow you to reduce the noise, while not losing sight of anything that is important. Get email and web notifications by choosing the topics you are interested in.

In order to debug compiled applications, it is necessary to match-up the IL or machine code in the binary with the original lines of source code. While this data could be embedded in the application itself, that would significantly increase the size of the EXE or DLL file. Instead, a separate “symbols” file is usually used. On the Windows platform, this is known as a PDB or “program database”.

Originally designed for C/C++, the PDB format has been expanded over the years to include .NET. Unfortunately, the format was always considered to be proprietary, which in this case means that it wasn’t well documented and really could only be read using Windows-only libraries.

With .NET Core, a new cross-platform PDB library was needed. But rather than trying just to port the existing library, Microsoft chose to rewrite the Windows PDB format. The new Portable PDB format drops the features needed for native code, leaving only .NET functionality. This allowed them to simplify the format and significantly reduce the size of the PDB files.

The Portable PDB format is publicly documented with an open source library for reading it. But there are some downsides: the Portable PDB format does not support Edit-and-Continue, FXCop style code analysis (Roslyn code analysis does work), profiling tools, post-compilation build steps such as AOP or Code Contracts, or .NET decompilers. None of these are permanent limitations, but it will take time for the tooling to be upgraded to support the new format.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT