-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #425 from Washi1337/development
5.2.0
- Loading branch information
Showing
225 changed files
with
8,564 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<Copyright>Copyright © Washi 2016-2022</Copyright> | ||
<Copyright>Copyright © Washi 2016-2023</Copyright> | ||
<PackageProjectUrl>https://github.com/Washi1337/AsmResolver</PackageProjectUrl> | ||
<PackageLicense>https://github.com/Washi1337/AsmResolver/LICENSE.md</PackageLicense> | ||
<RepositoryUrl>https://github.com/Washi1337/AsmResolver</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<LangVersion>10</LangVersion> | ||
<Version>5.1.0</Version> | ||
<Version>5.2.0</Version> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
Basic I/O | ||
========= | ||
|
||
Every PDB image interaction is done through classes defined by the ``AsmResolver.Symbols.Pdb`` namespace: | ||
|
||
.. code-block:: csharp | ||
using AsmResolver.Symbols.Pdb; | ||
Creating a new PDB Image | ||
------------------------ | ||
|
||
Creating a new image can be done by instantiating a ``PdbImage`` class: | ||
|
||
.. code-block:: csharp | ||
var image = new PdbImage(); | ||
Opening a PDB Image | ||
------------------- | ||
|
||
Opening a PDB Image can be done through one of the ``FromXXX`` methods from the ``PdbImage`` class: | ||
|
||
.. code-block:: csharp | ||
byte[] raw = ... | ||
var image = PdbImage.FromBytes(raw); | ||
.. code-block:: csharp | ||
var image = PdbImage.FromFile(@"C:\myfile.pdb"); | ||
.. code-block:: csharp | ||
MsfFile msfFile = ... | ||
var image = PdbImage.FromFile(msfFile); | ||
.. code-block:: csharp | ||
BinaryStreamReader reader = ... | ||
var image = PdbImage.FromReader(reader); | ||
If you want to read large files (+100MB), consider using memory mapped I/O instead: | ||
|
||
.. code-block:: csharp | ||
using var service = new MemoryMappedFileService(); | ||
var image = PdbImage.FromFile(service.OpenFile(@"C:\myfile.pdb")); | ||
Writing a PDB Image | ||
------------------- | ||
|
||
Writing PDB images directly is currently not supported yet, however there are plans to making this format fully serializable. | ||
|
||
|
||
Creating a new MSF File | ||
----------------------- | ||
|
||
Multi-Stream Format (MSF) files are files that form the backbone structure of all PDB images. | ||
AsmResolver fully supports this lower level type of access to MSF files using the ``MsfFile`` class. | ||
|
||
To create a new MSF file, use one of its constructors: | ||
|
||
.. code-block:: csharp | ||
var msfFile = new MsfFile(); | ||
.. code-block:: csharp | ||
var msfFile = new MsfFile(blockSize: 4096); | ||
Opening an MSF File | ||
------------------- | ||
|
||
Opening existing MSF files can be done in a very similar fashion as reading a PDB Image: | ||
|
||
.. code-block:: csharp | ||
byte[] raw = ... | ||
var msfFile = MsfFile.FromBytes(raw); | ||
.. code-block:: csharp | ||
var msfFile = MsfFile.FromFile(@"C:\myfile.pdb"); | ||
.. code-block:: csharp | ||
BinaryStreamReader reader = ... | ||
var msfFile = MsfFile.FromReader(reader); | ||
Similar to reading PDB images, if you want to read large files (+100MB), consider using memory mapped I/O instead: | ||
|
||
.. code-block:: csharp | ||
using var service = new MemoryMappedFileService(); | ||
var msfFile = MsfFile.FromFile(service.OpenFile(@"C:\myfile.pdb")); | ||
Writing an MSF File | ||
------------------- | ||
|
||
Writing an MSF file can be done through one of the ``Write`` method overloads. | ||
|
||
.. code-block:: csharp | ||
msfFile.Write(@"C:\myfile.patched.pdb"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Overview | ||
======== | ||
|
||
The Program Database (PDB) file format is a format developed by Microsoft for storing debugging information about binary files. | ||
PDBs are typically constructed based on the original source code the binary was compiled with, and lists various symbols that the source code defines and/or references. | ||
|
||
Since version 5.0, AsmResolver provides a work-in-progress implementation for reading (and sometimes writing) PDB files to allow for better analysis of compiled binaries. | ||
This implementation is fully managed, and thus does not depend on libraries such as the Debug Interface Access (DIA) that only work on the Windows platform. | ||
Furthermore, this project also aims to provide additional documentation on the file format, to make it more accessible to other developers. | ||
|
||
.. warning:: | ||
|
||
As the PDB file format is not very well documented, and mostly is reverse engineered from the official implementation provided by Microsoft, not everything in this API is finalized or stable yet. | ||
As such, this part of AsmResolver's API is still likely to undergo some breaking changes as development continues. |
Oops, something went wrong.