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

@@ -0,0 +1,3 @@
[*.cs]
indent_style = space
indent_size = 2

View File

@@ -9,10 +9,10 @@
//
//-----------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Diagnostics.SymbolStore;
using Mono.Cecil.Cil;
namespace Microsoft.Cci.Pdb {
internal class PdbFile {
@@ -254,7 +254,7 @@ namespace Microsoft.Cci.Pdb {
static void LoadFuncsFromDbiModule(BitAccess bits,
DbiModuleInfo info,
IntHashTable names,
ArrayList funcList,
List<PdbFunction> funcList,
bool readStrings,
MsfDirectory dir,
Dictionary<string, int> nameIndex,
@@ -297,7 +297,7 @@ namespace Microsoft.Cci.Pdb {
//}
// Read gpmod section.
ArrayList modList = new ArrayList();
List<DbiModuleInfo> modList = new List<DbiModuleInfo>();
int end = bits.Position + dh.gpmodiSize;
while (bits.Position < end) {
DbiModuleInfo mod = new DbiModuleInfo(bits, readStrings);
@@ -309,7 +309,7 @@ namespace Microsoft.Cci.Pdb {
}
if (modList.Count > 0) {
modules = (DbiModuleInfo[])modList.ToArray(typeof(DbiModuleInfo));
modules = modList.ToArray();
} else {
modules = null;
}
@@ -368,7 +368,7 @@ namespace Microsoft.Cci.Pdb {
dir.streams[3].Read(reader, bits);
LoadDbiStream(bits, out modules, out header, true);
ArrayList funcList = new ArrayList();
List<PdbFunction> funcList = new List<PdbFunction>();
if (modules != null) {
for (int m = 0; m < modules.Length; m++) {
@@ -384,7 +384,7 @@ namespace Microsoft.Cci.Pdb {
}
}
PdbFunction[] funcs = (PdbFunction[])funcList.ToArray(typeof(PdbFunction));
PdbFunction[] funcs = funcList.ToArray();
// After reading the functions, apply the token remapping table if it exists.
if (header.snTokenRidMap != 0 && header.snTokenRidMap != 0xffff) {
@@ -509,7 +509,7 @@ namespace Microsoft.Cci.Pdb {
string name = (string)names[(int)chk.name];
int guidStream;
Guid doctypeGuid = SymDocumentType.Text;
Guid doctypeGuid = DocumentType.Text.ToGuid();
Guid languageGuid = Guid.Empty;
Guid vendorGuid = Guid.Empty;
if (nameIndex.TryGetValue("/SRC/FILES/"+name.ToUpperInvariant(), out guidStream)) {

View File

@@ -29,7 +29,7 @@ namespace Microsoft.Cci.Pdb {
internal uint segment;
internal uint address;
//internal uint length;
internal uint length;
//internal byte[] metadata;
internal PdbScope[] scopes;
@@ -208,7 +208,7 @@ namespace Microsoft.Cci.Pdb {
//this.flags = proc.flags;
this.segment = proc.seg;
this.address = proc.off;
//this.length = proc.len;
this.length = proc.len;
if (proc.seg != 1) {
throw new PdbDebugException("Segment is {0}, not 1.", proc.seg);

View File

@@ -9,7 +9,6 @@ using System.IO;
using Microsoft.Cci;
using Microsoft.Cci.Pdb;
using System.Text;
using System.Diagnostics.SymbolStore;
namespace Microsoft.Cci {