Imported Upstream version 5.2.0.175

Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-06-07 13:16:24 +00:00
parent 4bdbaf4a88
commit 966bba02bb
8776 changed files with 346420 additions and 149650 deletions

View File

@@ -13,6 +13,7 @@ using System.IO;
using Mono.Cecil.Cil;
using Mono.Cecil.Metadata;
using Mono.Collections.Generic;
using RVA = System.UInt32;
@@ -28,11 +29,14 @@ namespace Mono.Cecil.PE {
public TargetArchitecture Architecture;
public ModuleCharacteristics Characteristics;
public ImageDebugHeader DebugHeader;
public Section [] Sections;
public Section MetadataSection;
public uint EntryPointToken;
public uint Timestamp;
public ModuleAttributes Attributes;
public DataDirectory Debug;
@@ -143,33 +147,6 @@ namespace Mono.Cecil.PE {
}
}
public ImageDebugDirectory GetDebugHeader (out byte [] header)
{
var reader = GetReaderAt (Debug.VirtualAddress);
if (reader == null) {
header = Empty<byte>.Array;
return new ImageDebugDirectory ();
}
var directory = new ImageDebugDirectory {
Characteristics = reader.ReadInt32 (),
TimeDateStamp = reader.ReadInt32 (),
MajorVersion = reader.ReadInt16 (),
MinorVersion = reader.ReadInt16 (),
Type = reader.ReadInt32 (),
SizeOfData = reader.ReadInt32 (),
AddressOfRawData = reader.ReadInt32 (),
PointerToRawData = reader.ReadInt32 (),
};
reader = GetReaderAt ((uint) directory.AddressOfRawData);
header = reader != null
? reader.ReadBytes (directory.SizeOfData)
: Empty<byte>.Array;
return directory;
}
public bool HasDebugTables ()
{
return HasTable (Table.Document)