LiveForensics.PdbMagician 1.0.200

Turns PDB files into C# classes

Install-Package LiveForensics.PdbMagician -Version 1.0.200
dotnet add package LiveForensics.PdbMagician --version 1.0.200
<PackageReference Include="LiveForensics.PdbMagician" Version="1.0.200" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LiveForensics.PdbMagician --version 1.0.200
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

To test the library, create yourself a new Windows Console Application in Visual Studio called TestHarness and then add the nuget package liveforensics.pdbmagician. I right-click the references section in the Solution Explorer and select Manage Nuget Packages.. Click browse and then select liveforensics in the search field.

Now add the following code:

using Pdb_Magician;
using System;
using System.Collections.Generic;
using System.IO;

namespace TestHarness
{
    class Program
    {
        static void Main(string[] args)
        {
            // this is a GUIDAGE from my Windows 10 x64 box.          
            string guidAge = "30B5FB31AE7E4ACAABA750AA241FF3311";
            string filename = "ntkrnlpa.pdb";

            // start by retrieving the Symbol file (PDB)
            PdbMagician myLib = new PdbMagician();
            bool result = myLib.RetrieveSymbolFile(filename, guidAge, @"c:\temp\magician");
            if(!result)
            {
                Console.WriteLine("One or more errors occurred..");
                string[] errors = myLib.GetErrorList();
                foreach (string s in errors)
                    Console.WriteLine(s);
            }
            else
                Console.WriteLine("Got It!");

            // if all went well, you'll now have the pdb file in c:\temp\magician\{GUIDAGE}\

            // now you have 2 choices, process all the symbols or just the ones you need for your project
            //
            // ALL symbols option
            string pdbLocation = Path.Combine(Path.Combine(@"c:\temp\magician", guidAge), filename);
            result = myLib.ParseAllSymbols(pdbLocation, Path.Combine(@"c:\temp\magician", guidAge));
            if (!result)
            {
                Console.WriteLine("One or more errors occurred..");
                string[] errors = myLib.GetErrorList();
                foreach (string s in errors)
                    Console.WriteLine(s);
            }
            else
                Console.WriteLine("Successfully Built: ");

            // selected symbols option
            List<string> todoList = new List<string>();
            todoList.Add("_OBJECT_DIRECTORY");
            todoList.Add("_EPROCESS");
            todoList.Add("_LIST_ENTRY");
            result = myLib.ParseSymbolFile(pdbLocation, Path.Combine(@"c:\temp\magician", guidAge), todoList.ToArray());
            if (!result)
            {
                Console.WriteLine("One or more errors occurred..");
                string[] errors = myLib.GetErrorList();
                foreach (string s in errors)
                    Console.WriteLine(s);
            }
            else
                Console.WriteLine("Successfully Built: ");

        }
    }
}

There's Documentation on the Github site along with the source if you want more than just the binaries.

Github location

To test the library, create yourself a new Windows Console Application in Visual Studio called TestHarness and then add the nuget package liveforensics.pdbmagician. I right-click the references section in the Solution Explorer and select Manage Nuget Packages.. Click browse and then select liveforensics in the search field.

Now add the following code:

using Pdb_Magician;
using System;
using System.Collections.Generic;
using System.IO;

namespace TestHarness
{
    class Program
    {
        static void Main(string[] args)
        {
            // this is a GUIDAGE from my Windows 10 x64 box.          
            string guidAge = "30B5FB31AE7E4ACAABA750AA241FF3311";
            string filename = "ntkrnlpa.pdb";

            // start by retrieving the Symbol file (PDB)
            PdbMagician myLib = new PdbMagician();
            bool result = myLib.RetrieveSymbolFile(filename, guidAge, @"c:\temp\magician");
            if(!result)
            {
                Console.WriteLine("One or more errors occurred..");
                string[] errors = myLib.GetErrorList();
                foreach (string s in errors)
                    Console.WriteLine(s);
            }
            else
                Console.WriteLine("Got It!");

            // if all went well, you'll now have the pdb file in c:\temp\magician\{GUIDAGE}\

            // now you have 2 choices, process all the symbols or just the ones you need for your project
            //
            // ALL symbols option
            string pdbLocation = Path.Combine(Path.Combine(@"c:\temp\magician", guidAge), filename);
            result = myLib.ParseAllSymbols(pdbLocation, Path.Combine(@"c:\temp\magician", guidAge));
            if (!result)
            {
                Console.WriteLine("One or more errors occurred..");
                string[] errors = myLib.GetErrorList();
                foreach (string s in errors)
                    Console.WriteLine(s);
            }
            else
                Console.WriteLine("Successfully Built: ");

            // selected symbols option
            List<string> todoList = new List<string>();
            todoList.Add("_OBJECT_DIRECTORY");
            todoList.Add("_EPROCESS");
            todoList.Add("_LIST_ENTRY");
            result = myLib.ParseSymbolFile(pdbLocation, Path.Combine(@"c:\temp\magician", guidAge), todoList.ToArray());
            if (!result)
            {
                Console.WriteLine("One or more errors occurred..");
                string[] errors = myLib.GetErrorList();
                foreach (string s in errors)
                    Console.WriteLine(s);
            }
            else
                Console.WriteLine("Successfully Built: ");

        }
    }
}

There's Documentation on the Github site along with the source if you want more than just the binaries.

Github location

Release Notes

The first release of this library.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.200 253 12/21/2017
1.0.199 274 12/21/2017
1.0.198 224 12/21/2017
1.0.197 277 12/21/2017