提交 b74702c2 编写于 作者: T Tomas Matousek

Move Pdb2Xml from closed to open

上级 85de7873
......@@ -81,7 +81,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SyntaxVisualizerControl", "
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "SyntaxVisualizerDgmlHelper", "Tools\Source\SyntaxVisualizer\SyntaxVisualizerDgmlHelper\SyntaxVisualizerDgmlHelper.vbproj", "{DA4F74AF-2694-4AC9-A8CC-18382DE8215E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Visualizer", "Visualizer", "{64BDF58B-41BA-A19E-0D34-B5FA598403B6}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Visualizers", "Visualizers", "{64BDF58B-41BA-A19E-0D34-B5FA598403B6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{FD0FAF5F-1DED-485C-99FA-84B97F3A8EEC}"
EndProject
......@@ -321,6 +321,8 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SharedCollections", "Compil
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpWinRTTest", "Compilers\CSharp\Test\WinRT\CSharpWinRTTest.csproj", "{FCFA8808-A1B6-48CC-A1EA-0B8CA8AEDA8E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pdb2Xml", "Tools\Source\Pdb2Xml\Pdb2Xml.csproj", "{CF450DCE-D12B-4A11-8D2D-A7A125372C48}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Compilers\Core\AnalyzerDriver\AnalyzerDriver.projitems*{edc68a0e-c68d-4a74-91b7-bf38ec909888}*SharedItemsImports = 4
......@@ -1848,6 +1850,18 @@ Global
{FCFA8808-A1B6-48CC-A1EA-0B8CA8AEDA8E}.Release|ARM.ActiveCfg = Release|Any CPU
{FCFA8808-A1B6-48CC-A1EA-0B8CA8AEDA8E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{FCFA8808-A1B6-48CC-A1EA-0B8CA8AEDA8E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{CF450DCE-D12B-4A11-8D2D-A7A125372C48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CF450DCE-D12B-4A11-8D2D-A7A125372C48}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CF450DCE-D12B-4A11-8D2D-A7A125372C48}.Debug|ARM.ActiveCfg = Debug|Any CPU
{CF450DCE-D12B-4A11-8D2D-A7A125372C48}.Debug|ARM.Build.0 = Debug|Any CPU
{CF450DCE-D12B-4A11-8D2D-A7A125372C48}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{CF450DCE-D12B-4A11-8D2D-A7A125372C48}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{CF450DCE-D12B-4A11-8D2D-A7A125372C48}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CF450DCE-D12B-4A11-8D2D-A7A125372C48}.Release|Any CPU.Build.0 = Release|Any CPU
{CF450DCE-D12B-4A11-8D2D-A7A125372C48}.Release|ARM.ActiveCfg = Release|Any CPU
{CF450DCE-D12B-4A11-8D2D-A7A125372C48}.Release|ARM.Build.0 = Release|Any CPU
{CF450DCE-D12B-4A11-8D2D-A7A125372C48}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{CF450DCE-D12B-4A11-8D2D-A7A125372C48}.Release|Mixed Platforms.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......@@ -1978,6 +1992,7 @@ Global
{5002636A-FE8D-40BF-8818-AB513A2194FA} = {998CAFE8-06E4-4683-A151-0F6AA4BFF6C6}
{ABDBAC1E-350E-4DC3-BB45-3504404545EE} = {998CAFE8-06E4-4683-A151-0F6AA4BFF6C6}
{BEDC5A4A-809E-4017-9CFD-6C8D4E1847F0} = {998CAFE8-06E4-4683-A151-0F6AA4BFF6C6}
{4C7847DB-C412-4D5E-B573-F12FA0A76127} = {64BDF58B-41BA-A19E-0D34-B5FA598403B6}
{2344BE45-7F6B-4A4E-9418-567FA2D9CA8C} = {5F5DD61A-746D-40AE-A89C-EF82B39C036E}
{D8762A0A-3832-47BE-BCF6-8B1060BE6B28} = {2344BE45-7F6B-4A4E-9418-567FA2D9CA8C}
{921B412A-5551-4853-82B4-46AD5A05A03E} = {2344BE45-7F6B-4A4E-9418-567FA2D9CA8C}
......@@ -1996,5 +2011,6 @@ Global
{D0BC9BE7-24F6-40CA-8DC6-FCB93BD44B34} = {A41D1B99-F489-4C43-BBDF-96D61B19A6B9}
{C1930979-C824-496B-A630-70F5369A636F} = {A41D1B99-F489-4C43-BBDF-96D61B19A6B9}
{FCFA8808-A1B6-48CC-A1EA-0B8CA8AEDA8E} = {32A48625-F0AD-419D-828B-A50BDABA38EA}
{CF450DCE-D12B-4A11-8D2D-A7A125372C48} = {64BDF58B-41BA-A19E-0D34-B5FA598403B6}
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="Settings">
<Import Project="..\..\..\Tools\Microsoft.CodeAnalysis.Toolset.Open\Targets\VSL.Settings.targets" />
<Import Project="..\..\..\..\build\VSL.Settings.Closed.targets" />
</ImportGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{CF450DCE-D12B-4A11-8D2D-A7A125372C48}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Pdb2Xml</RootNamespace>
<AssemblyName>Pdb2Xml</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<Prefer32Bit>false</Prefer32Bit>
<LargeAddressAware>true</LargeAddressAware>
<SolutionDir Condition="'$(SolutionDir)' == '' OR '$(SolutionDir)' == '*Undefined*'">..\..\..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Compile Include="PdbToXmlApp.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Test\PdbUtilities\PdbUtilities.csproj">
<Project>{afde6bea-5038-4a4a-a88e-dbd2e4088eed}</Project>
<Name>PdbUtilities</Name>
</ProjectReference>
<None Include="packages.config" />
</ItemGroup>
<ImportGroup Label="Targets">
<Import Project="..\..\..\Tools\Microsoft.CodeAnalysis.Toolset.Open\Targets\VSL.Imports.targets" />
<Import Project="..\..\..\..\build\VSL.Imports.Closed.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
</ImportGroup>
</Project>
\ No newline at end of file
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Roslyn.Test.PdbUtilities;
internal static class PdbToXmlApp
{
public static void Main(string[] args)
{
if (args.Length == 0)
{
Console.WriteLine("Usage: Pdb2Xml <file.dll> [<output file>] [/tokens] [/methodSpans]");
return;
}
List<string> argList = new List<string>(args);
var options = PdbToXmlOptions.ResolveTokens;
if (argList.Remove("/tokens"))
{
options |= PdbToXmlOptions.IncludeTokens;
}
if (argList.Remove("/methodSpans"))
{
options |= PdbToXmlOptions.IncludeMethodSpans;
}
string file = argList[0];
if (!File.Exists(file))
{
Console.WriteLine("File not found- {0}", file);
return;
}
string pdbFile = Path.ChangeExtension(file, ".pdb");
if (!File.Exists(pdbFile))
{
Console.WriteLine("PDB File not found- {0}", pdbFile);
return;
}
string xmlFile;
if (argList.Count > 1)
{
xmlFile = argList[1];
}
else
{
xmlFile = Path.ChangeExtension(pdbFile, ".xml");
}
if (File.Exists(xmlFile))
{
try
{
File.Delete(xmlFile);
}
catch { }
}
GenXmlFromPdb(file, pdbFile, xmlFile, options);
Console.WriteLine("PDB dump written to {0}", xmlFile);
}
public static void GenXmlFromPdb(string exePath, string pdbPath, string outPath, PdbToXmlOptions options)
{
using (var exebits = new FileStream(exePath, FileMode.Open, FileAccess.Read))
{
using (var pdbbits = new FileStream(pdbPath, FileMode.Open, FileAccess.Read))
{
using (var sw = new StreamWriter(outPath, append: false, encoding: Encoding.UTF8))
{
PdbToXmlConverter.ToXml(sw, pdbbits, exebits, options);
}
}
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
</packages>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册