-
Notifications
You must be signed in to change notification settings - Fork 55
Find out more about Portable PDB #93
Comments
Mono 4.2.0 was released with support for the PPDB format which is version 0.1. |
There is related code in Roslyn: |
The related code above exposes a portable pdb to the existing Windows DiaSymReader for compatibility with existing Windows APIs. |
Great progress today at the Microsoft MVP Summit and a plan is in place for the cross platform portable pdb format. Portable pdb is the future for .NET. |
I proposed that F# switch to the portable pdb format. dotnet/fsharp#718 |
The discussion for adding .pdb files to the NuGet packages in Roslyn is dotnet/roslyn#3. They will be the trend setter. |
It is easy to read in the portable pdb format using open System.Reflection.Metadata
open System.Runtime.InteropServices
open System.IO
open Microsoft.FSharp.NativeInterop
#nowarn "9"
let printfn format = Printf.ksprintf System.Diagnostics.Debug.WriteLine format
[<EntryPoint>]
let main argv =
let f = @"C:\cs\roslyn\Binaries\Obj\PdbUtilities\Release\Roslyn.Test.PdbUtilities.pdb"
let bytes = File.ReadAllBytes f
let pBytes = GCHandle.Alloc(bytes, GCHandleType.Pinned)
let mr = MetadataReader(pBytes.AddrOfPinnedObject() |> NativePtr.ofNativeInt, bytes.Length)
for dh in mr.Documents do
let d = mr.GetDocument dh
let name = mr.GetString d.Name
let language = mr.GetGuid d.Language
let hashAlgorithm = mr.GetGuid d.HashAlgorithm
let hash = mr.GetBlobBytes d.Hash
// Hex.fs from https://github.com/ctaggart/SourceLink/blob/master/SourceLink/Hex.fs
printfn "%s %s" (Hex.encode hash) name
pBytes.Free() // reminder for later
0 |
Portable PDB support is coming in #121. |
Miguel de Icaza blogged a couple of days ago bout new new Portable Program Database (PPDB) files format.
Portable PDB v0.1: Format Specification Draft
https://github.com/dotnet/roslyn/blob/master/docs/specs/PortablePdb-Metadata.md
Code got merged to Roslyn master 10 days ago:
dotnet/roslyn#3891
The text was updated successfully, but these errors were encountered: