From 8c5fe1933e4cac5c93825a3408093eb1c57a5648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Matou=C5=A1ek?= Date: Fri, 17 Nov 2017 16:49:07 -0800 Subject: [PATCH] Enable injecting srcsvr variables (#97) * Enable injecting srcsvr variables * Rename package to Microsoft.DiaSymReader.Pdb2Pdb --- .../PdbConverterPortableToWindowsTests.cs | 27 ++++++ .../PortableToWindowsTests.cs | 88 +++++++++++++++++++ .../TestHelpers/PdbValidationXml.cs | 8 +- .../WindowsToPortableTests.cs | 2 +- .../ConverterResources.resx | 9 ++ .../PdbConversionOptions.cs | 15 ---- .../PdbConverter.cs | 14 +-- .../PdbConverterPortableToWindows.cs | 68 ++++++++++++-- .../PortablePdbConversionOptions.cs | 38 ++++++++ .../xlf/ConverterResources.cs.xlf | 15 ++++ .../xlf/ConverterResources.de.xlf | 15 ++++ .../xlf/ConverterResources.es.xlf | 15 ++++ .../xlf/ConverterResources.fr.xlf | 15 ++++ .../xlf/ConverterResources.it.xlf | 15 ++++ .../xlf/ConverterResources.ja.xlf | 15 ++++ .../xlf/ConverterResources.ko.xlf | 15 ++++ .../xlf/ConverterResources.pl.xlf | 15 ++++ .../xlf/ConverterResources.pt-BR.xlf | 15 ++++ .../xlf/ConverterResources.ru.xlf | 15 ++++ .../xlf/ConverterResources.tr.xlf | 15 ++++ .../xlf/ConverterResources.zh-Hans.xlf | 15 ++++ .../xlf/ConverterResources.zh-Hant.xlf | 15 ++++ src/Pdb2Pdb.Tests/Pdb2PdbTests.cs | 42 ++++++--- src/Pdb2Pdb/Pdb2Pdb.cs | 41 +++++++-- src/Pdb2Pdb/Pdb2Pdb.nuspec | 2 +- src/Pdb2Pdb/Resources.resx | 18 ++-- src/Pdb2Pdb/xlf/Resources.cs.xlf | 35 +++++--- src/Pdb2Pdb/xlf/Resources.de.xlf | 35 +++++--- src/Pdb2Pdb/xlf/Resources.es.xlf | 35 +++++--- src/Pdb2Pdb/xlf/Resources.fr.xlf | 35 +++++--- src/Pdb2Pdb/xlf/Resources.it.xlf | 35 +++++--- src/Pdb2Pdb/xlf/Resources.ja.xlf | 35 +++++--- src/Pdb2Pdb/xlf/Resources.ko.xlf | 35 +++++--- src/Pdb2Pdb/xlf/Resources.pl.xlf | 35 +++++--- src/Pdb2Pdb/xlf/Resources.pt-BR.xlf | 35 +++++--- src/Pdb2Pdb/xlf/Resources.ru.xlf | 35 +++++--- src/Pdb2Pdb/xlf/Resources.tr.xlf | 35 +++++--- src/Pdb2Pdb/xlf/Resources.zh-Hans.xlf | 35 +++++--- src/Pdb2Pdb/xlf/Resources.zh-Hant.xlf | 35 +++++--- 39 files changed, 834 insertions(+), 188 deletions(-) create mode 100644 src/Microsoft.DiaSymReader.Converter.Tests/PdbConverterPortableToWindowsTests.cs delete mode 100644 src/Microsoft.DiaSymReader.Converter/PdbConversionOptions.cs create mode 100644 src/Microsoft.DiaSymReader.Converter/PortablePdbConversionOptions.cs diff --git a/src/Microsoft.DiaSymReader.Converter.Tests/PdbConverterPortableToWindowsTests.cs b/src/Microsoft.DiaSymReader.Converter.Tests/PdbConverterPortableToWindowsTests.cs new file mode 100644 index 0000000..53fc464 --- /dev/null +++ b/src/Microsoft.DiaSymReader.Converter.Tests/PdbConverterPortableToWindowsTests.cs @@ -0,0 +1,27 @@ +// 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 Xunit; +using System; + +namespace Microsoft.DiaSymReader.Tools.UnitTests +{ + public class PdbConverterPortableToWindowsTests + { + [Fact] + public void ValidateSrcSvrVariables() + { + PdbConverterPortableToWindows.ValidateSrcSvrVariable("A", "", ""); + PdbConverterPortableToWindows.ValidateSrcSvrVariable("AZaz09_", "", ""); + PdbConverterPortableToWindows.ValidateSrcSvrVariable("ABC", "", ""); + + Assert.Throws(() => PdbConverterPortableToWindows.ValidateSrcSvrVariable(null, "", "")); + Assert.Throws(() => PdbConverterPortableToWindows.ValidateSrcSvrVariable("", "", "")); + Assert.Throws(() => PdbConverterPortableToWindows.ValidateSrcSvrVariable("-", "", "")); + Assert.Throws(() => PdbConverterPortableToWindows.ValidateSrcSvrVariable("ABC_[", "", "")); + Assert.Throws(() => PdbConverterPortableToWindows.ValidateSrcSvrVariable("0ABC", "", "")); + Assert.Throws(() => PdbConverterPortableToWindows.ValidateSrcSvrVariable("A", "a\r", "")); + Assert.Throws(() => PdbConverterPortableToWindows.ValidateSrcSvrVariable("A", "a\n", "")); + Assert.Throws(() => PdbConverterPortableToWindows.ValidateSrcSvrVariable("A", "a\0", "")); + } + } +} diff --git a/src/Microsoft.DiaSymReader.Converter.Tests/PortableToWindowsTests.cs b/src/Microsoft.DiaSymReader.Converter.Tests/PortableToWindowsTests.cs index 6ab17b1..e70734a 100644 --- a/src/Microsoft.DiaSymReader.Converter.Tests/PortableToWindowsTests.cs +++ b/src/Microsoft.DiaSymReader.Converter.Tests/PortableToWindowsTests.cs @@ -1,6 +1,7 @@ // 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 Xunit; +using System.Collections.Generic; namespace Microsoft.DiaSymReader.Tools.UnitTests { @@ -1143,6 +1144,93 @@ SRCSRV: end ------------------------------------------------]]> }); } + [Fact] + public void Convert_SourceLinkToSourceDataSrcSvrVars() + { + VerifyWindowsConvertedFromPortableMatchesExpected( + TestResources.SourceLink.DllAndPdb(portable: true), +@" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +", +new[] +{ + new PdbDiagnostic(PdbDiagnosticId.UnmappedDocumentName, 0, new[] { @"C:\*\5.cs" }) +}, +new PortablePdbConversionOptions(srcSvrVariables: new[] +{ + new KeyValuePair("ABC", "*"), + new KeyValuePair("XYZ", "123") +})); + } + [Fact] public void Convert_EmbeddedSource() { diff --git a/src/Microsoft.DiaSymReader.Converter.Tests/TestHelpers/PdbValidationXml.cs b/src/Microsoft.DiaSymReader.Converter.Tests/TestHelpers/PdbValidationXml.cs index fd90d6b..0d95406 100644 --- a/src/Microsoft.DiaSymReader.Converter.Tests/TestHelpers/PdbValidationXml.cs +++ b/src/Microsoft.DiaSymReader.Converter.Tests/TestHelpers/PdbValidationXml.cs @@ -16,10 +16,10 @@ namespace Microsoft.DiaSymReader.Tools.UnitTests { private const PdbToXmlOptions Options = PdbToXmlOptions.IncludeSourceServerInformation | PdbToXmlOptions.IncludeEmbeddedSources | PdbToXmlOptions.ResolveTokens; - public static void VerifyWindowsPdb(TestResource portable, TestResource windows, string expectedXml, PdbDiagnostic[] expectedDiagnostics = null) + public static void VerifyWindowsPdb(TestResource portable, TestResource windows, string expectedXml, PdbDiagnostic[] expectedDiagnostics = null, PortablePdbConversionOptions options = null) { VerifyWindowsMatchesExpected(windows, expectedXml); - VerifyWindowsConvertedFromPortableMatchesExpected(portable, expectedXml, expectedDiagnostics); + VerifyWindowsConvertedFromPortableMatchesExpected(portable, expectedXml, expectedDiagnostics, options); } private static void VerifyWindowsMatchesExpected(TestResource windows, string expectedXml) @@ -34,7 +34,7 @@ namespace Microsoft.DiaSymReader.Tools.UnitTests AssertEx.AssertLinesEqual(adjustedExpectedXml, adjustedActualXml, "Comparing Windows PDB with expected XML"); } - private static void VerifyWindowsConvertedFromPortableMatchesExpected(TestResource portable, string expectedXml, PdbDiagnostic[] expectedDiagnostics) + public static void VerifyWindowsConvertedFromPortableMatchesExpected(TestResource portable, string expectedXml, PdbDiagnostic[] expectedDiagnostics, PortablePdbConversionOptions options) { var portablePEStream = new MemoryStream(portable.PE); var portablePdbStream = new MemoryStream(portable.Pdb); @@ -42,7 +42,7 @@ namespace Microsoft.DiaSymReader.Tools.UnitTests var actualDiagnostics = new List(); var converter = new PdbConverter(actualDiagnostics.Add); - converter.ConvertPortableToWindows(portablePEStream, portablePdbStream, convertedWindowsPdbStream); + converter.ConvertPortableToWindows(portablePEStream, portablePdbStream, convertedWindowsPdbStream, options); AssertEx.Equal(expectedDiagnostics ?? Array.Empty(), actualDiagnostics, itemInspector: InspectDiagnostic); diff --git a/src/Microsoft.DiaSymReader.Converter.Tests/WindowsToPortableTests.cs b/src/Microsoft.DiaSymReader.Converter.Tests/WindowsToPortableTests.cs index dad861b..0728a2d 100644 --- a/src/Microsoft.DiaSymReader.Converter.Tests/WindowsToPortableTests.cs +++ b/src/Microsoft.DiaSymReader.Converter.Tests/WindowsToPortableTests.cs @@ -1,10 +1,10 @@ // 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 Xunit; +using Roslyn.Test.Utilities; namespace Microsoft.DiaSymReader.Tools.UnitTests { - using Roslyn.Test.Utilities; using static PdbValidationMetadata; public class WindowsToPortableTests diff --git a/src/Microsoft.DiaSymReader.Converter/ConverterResources.resx b/src/Microsoft.DiaSymReader.Converter/ConverterResources.resx index f80c453..6f49bba 100644 --- a/src/Microsoft.DiaSymReader.Converter/ConverterResources.resx +++ b/src/Microsoft.DiaSymReader.Converter/ConverterResources.resx @@ -252,4 +252,13 @@ The JSON format is invalid + + Invalid srcsvr variable name: '{0}' + + + Variable '{0}' can't be set explicitly + + + Value of srcsvr variable '{0}' contains invalid characters + \ No newline at end of file diff --git a/src/Microsoft.DiaSymReader.Converter/PdbConversionOptions.cs b/src/Microsoft.DiaSymReader.Converter/PdbConversionOptions.cs deleted file mode 100644 index 88f8cb6..0000000 --- a/src/Microsoft.DiaSymReader.Converter/PdbConversionOptions.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -namespace Microsoft.DiaSymReader.Tools -{ - public enum PdbConversionOptions - { - Default = 0, - - /// - /// When converting to Windows PDB include Source Link data as is, - /// without converting to srcsrv. - /// - SuppressSourceLinkConversion = 1, - } -} diff --git a/src/Microsoft.DiaSymReader.Converter/PdbConverter.cs b/src/Microsoft.DiaSymReader.Converter/PdbConverter.cs index f3ffec9..dc9a3dc 100644 --- a/src/Microsoft.DiaSymReader.Converter/PdbConverter.cs +++ b/src/Microsoft.DiaSymReader.Converter/PdbConverter.cs @@ -105,7 +105,7 @@ namespace Microsoft.DiaSymReader.Tools /// The PDB doesn't match the CodeView Debug Directory record in the PE image. /// IO error while reading from or writing to a stream. /// Stream has been disposed while reading/writing. - public void ConvertPortableToWindows(Stream peStream, Stream sourcePdbStream, Stream targetPdbStream, PdbConversionOptions options = default) + public void ConvertPortableToWindows(Stream peStream, Stream sourcePdbStream, Stream targetPdbStream, PortablePdbConversionOptions options = null) { StreamUtilities.ValidateStream(peStream, nameof(peStream), readRequired: true, seekRequired: true); using (var peReader = new PEReader(peStream, PEStreamOptions.LeaveOpen)) @@ -128,7 +128,7 @@ namespace Microsoft.DiaSymReader.Tools /// The PDB doesn't match the CodeView Debug Directory record in the PE image. /// IO error while reading from or writing to a stream. /// Stream has been disposed while reading/writing. - public void ConvertPortableToWindows(PEReader peReader, Stream sourcePdbStream, Stream targetPdbStream, PdbConversionOptions options = default) + public void ConvertPortableToWindows(PEReader peReader, Stream sourcePdbStream, Stream targetPdbStream, PortablePdbConversionOptions options = null) { StreamUtilities.ValidateStream(sourcePdbStream, nameof(sourcePdbStream), readRequired: true); @@ -151,7 +151,7 @@ namespace Microsoft.DiaSymReader.Tools /// The PDB doesn't match the CodeView Debug Directory record in the PE image. /// IO error while reading from or writing to a stream. /// Stream has been disposed while reading/writing. - public void ConvertPortableToWindows(PEReader peReader, MetadataReader pdbReader, Stream targetPdbStream, PdbConversionOptions options = default) + public void ConvertPortableToWindows(PEReader peReader, MetadataReader pdbReader, Stream targetPdbStream, PortablePdbConversionOptions options = null) { if (pdbReader == null) { @@ -178,13 +178,13 @@ namespace Microsoft.DiaSymReader.Tools /// The format of the PE image or the source PDB image is invalid. /// The PDB doesn't match the CodeView Debug Directory record in the PE image. /// IO error while reading from or writing to a stream. - public void ConvertPortableToWindows(PEReader peReader, MetadataReader pdbReader, SymUnmanagedWriter pdbWriter, PdbConversionOptions options) + public void ConvertPortableToWindows(PEReader peReader, MetadataReader pdbReader, SymUnmanagedWriter pdbWriter, PortablePdbConversionOptions options = null) { new PdbConverterPortableToWindows(_diagnosticReporterOpt).Convert( - peReader ?? throw new ArgumentNullException(nameof(peReader)), + peReader ?? throw new ArgumentNullException(nameof(peReader)), pdbReader ?? throw new ArgumentNullException(nameof(pdbReader)), - pdbWriter ?? throw new ArgumentNullException(nameof(pdbWriter)), - options); + pdbWriter ?? throw new ArgumentNullException(nameof(pdbWriter)), + options ?? PortablePdbConversionOptions.Default); } } } \ No newline at end of file diff --git a/src/Microsoft.DiaSymReader.Converter/PdbConverterPortableToWindows.cs b/src/Microsoft.DiaSymReader.Converter/PdbConverterPortableToWindows.cs index c0eb56c..fa3e47e 100644 --- a/src/Microsoft.DiaSymReader.Converter/PdbConverterPortableToWindows.cs +++ b/src/Microsoft.DiaSymReader.Converter/PdbConverterPortableToWindows.cs @@ -77,8 +77,13 @@ namespace Microsoft.DiaSymReader.Tools public bool IsHoistedScope => HoistedVariableStartIndex < HoistedVariableEndIndex; } - internal void Convert(PEReader peReader, MetadataReader pdbReader, SymUnmanagedWriter pdbWriter, PdbConversionOptions options) + internal void Convert(PEReader peReader, MetadataReader pdbReader, SymUnmanagedWriter pdbWriter, PortablePdbConversionOptions options) { + Debug.Assert(peReader != null); + Debug.Assert(pdbReader != null); + Debug.Assert(pdbWriter != null); + Debug.Assert(options != null); + if (!SymReaderHelpers.TryReadPdbId(peReader, out var pePdbId, out int peAge)) { throw new InvalidDataException(ConverterResources.SpecifiedPEFileHasNoAssociatedPdb); @@ -572,13 +577,13 @@ namespace Microsoft.DiaSymReader.Tools var sourceLinkHandle = pdbReader.GetCustomDebugInformation(EntityHandle.ModuleDefinition, PortableCustomDebugInfoKinds.SourceLink); if (!sourceLinkHandle.IsNil) { - if ((options & PdbConversionOptions.SuppressSourceLinkConversion) == 0) + if (options.SuppressSourceLinkConversion) { - ConvertSourceServerData(pdbReader.GetStringUTF8(sourceLinkHandle), pdbWriter, documentNames); + pdbWriter.SetSourceLinkData(pdbReader.GetBlobBytes(sourceLinkHandle)); } else { - pdbWriter.SetSourceLinkData(pdbReader.GetBlobBytes(sourceLinkHandle)); + ConvertSourceServerData(pdbReader.GetStringUTF8(sourceLinkHandle), pdbWriter, documentNames, options); } } @@ -960,9 +965,13 @@ namespace Microsoft.DiaSymReader.Tools symSequencePointsWriter.Flush(); } + private const string SrcSvr_RAWURL = "RAWURL"; + private const string SrcSvr_SRCSRVVERCTRL = "SRCSRVVERCTRL"; + private const string SrcSvr_SRCSRVTRG = "SRCSRVTRG"; + // Avoid loading JSON dependency if not needed. [MethodImpl(MethodImplOptions.NoInlining)] - private void ConvertSourceServerData(string sourceLink, SymUnmanagedWriter pdbWriter, IReadOnlyCollection documentNames) + private void ConvertSourceServerData(string sourceLink, SymUnmanagedWriter pdbWriter, IReadOnlyCollection documentNames, PortablePdbConversionOptions options) { if (documentNames.Count == 0) { @@ -1029,13 +1038,22 @@ namespace Microsoft.DiaSymReader.Tools builder.Append("SRCSRV: ini ------------------------------------------------\r\n"); builder.Append("VERSION=2\r\n"); builder.Append("SRCSRV: variables ------------------------------------------\r\n"); - builder.Append("RAWURL="); + builder.Append(SrcSvr_RAWURL + "="); builder.Append(commonPrefix); builder.Append("%var2%\r\n"); - builder.Append("SRCSRVVERCTRL="); + builder.Append(SrcSvr_SRCSRVVERCTRL + "="); builder.Append(commonScheme); builder.Append("\r\n"); - builder.Append("SRCSRVTRG=%RAWURL%\r\n"); + builder.Append(SrcSvr_SRCSRVTRG + "=%RAWURL%\r\n"); + + foreach (var variable in options.SrcSvrVariables) + { + builder.Append(variable.Key); + builder.Append('='); + builder.Append(variable.Value); + builder.Append("\r\n"); + } + builder.Append("SRCSRV: source files ---------------------------------------\r\n"); foreach (var (name, uri) in mapping) @@ -1050,5 +1068,39 @@ namespace Microsoft.DiaSymReader.Tools pdbWriter.SetSourceServerData(Encoding.UTF8.GetBytes(builder.ToString())); } + + private static bool IsIdentifierStartChar(char c) + => c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z' || c == '_'; + + private static bool IsIdentifierChar(char c) + => IsIdentifierStartChar(c) || c >= '0' && c <= '9'; + + internal static void ValidateSrcSvrVariables(ImmutableArray> variables, string parameterName) + { + foreach (var variable in variables) + { + ValidateSrcSvrVariable(variable.Key, variable.Value, parameterName); + } + } + + internal static void ValidateSrcSvrVariable(string name, string value, string parameterName) + { + if (string.IsNullOrEmpty(name) || !IsIdentifierStartChar(name[0]) || !name.All(IsIdentifierChar)) + { + throw new ArgumentException(parameterName, string.Format(ConverterResources.InvalidSrcSvrVariableName, name)); + } + + if (value == null || value.Any(c => c == '\0' || c == '\r' || c == '\n')) + { + throw new ArgumentException(parameterName, string.Format(ConverterResources.InvalidSrcSvrVariableValue, name)); + } + + if (name.Equals(SrcSvr_RAWURL, StringComparison.OrdinalIgnoreCase) || + name.Equals(SrcSvr_SRCSRVTRG, StringComparison.OrdinalIgnoreCase) || + name.Equals(SrcSvr_SRCSRVVERCTRL, StringComparison.OrdinalIgnoreCase)) + { + throw new ArgumentException(parameterName, string.Format(ConverterResources.ReservedSrcSvrVariableName, name)); + } + } } } diff --git a/src/Microsoft.DiaSymReader.Converter/PortablePdbConversionOptions.cs b/src/Microsoft.DiaSymReader.Converter/PortablePdbConversionOptions.cs new file mode 100644 index 0000000..5d2368e --- /dev/null +++ b/src/Microsoft.DiaSymReader.Converter/PortablePdbConversionOptions.cs @@ -0,0 +1,38 @@ +// 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.Collections.Immutable; + +namespace Microsoft.DiaSymReader.Tools +{ + /// + /// Portable to Windows PDB conversion options. + /// + public sealed class PortablePdbConversionOptions + { + public static readonly PortablePdbConversionOptions Default = new PortablePdbConversionOptions(); + + /// + /// When converting to Windows PDB include Source Link data as is, + /// without converting to srcsrv. + /// + public bool SuppressSourceLinkConversion { get; } + + /// + /// Additional variable definitions to add to variable section of the srcsvr stream. + /// + public ImmutableArray> SrcSvrVariables { get; } + + public PortablePdbConversionOptions( + bool suppressSourceLinkConversion = false, + IEnumerable> srcSvrVariables = null) + { + var variables = srcSvrVariables?.ToImmutableArray() ?? ImmutableArray>.Empty; + PdbConverterPortableToWindows.ValidateSrcSvrVariables(variables, nameof(srcSvrVariables)); + + SuppressSourceLinkConversion = suppressSourceLinkConversion; + SrcSvrVariables = variables; + } + } +} diff --git a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.cs.xlf b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.cs.xlf index 144bf13..77d3a26 100644 --- a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.cs.xlf +++ b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.cs.xlf @@ -227,6 +227,21 @@ Invalid Source Link: {0} + + Invalid srcsvr variable name: '{0}' + Invalid srcsvr variable name: '{0}' + + + + Variable '{0}' can't be set explicitly + Variable '{0}' can't be set explicitly + + + + Value of srcsvr variable '{0}' contains invalid characters + Value of srcsvr variable '{0}' contains invalid characters + + \ No newline at end of file diff --git a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.de.xlf b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.de.xlf index e67896c..7ee05b0 100644 --- a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.de.xlf +++ b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.de.xlf @@ -227,6 +227,21 @@ Invalid Source Link: {0} + + Invalid srcsvr variable name: '{0}' + Invalid srcsvr variable name: '{0}' + + + + Variable '{0}' can't be set explicitly + Variable '{0}' can't be set explicitly + + + + Value of srcsvr variable '{0}' contains invalid characters + Value of srcsvr variable '{0}' contains invalid characters + + \ No newline at end of file diff --git a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.es.xlf b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.es.xlf index 11d02b8..1068101 100644 --- a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.es.xlf +++ b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.es.xlf @@ -227,6 +227,21 @@ Invalid Source Link: {0} + + Invalid srcsvr variable name: '{0}' + Invalid srcsvr variable name: '{0}' + + + + Variable '{0}' can't be set explicitly + Variable '{0}' can't be set explicitly + + + + Value of srcsvr variable '{0}' contains invalid characters + Value of srcsvr variable '{0}' contains invalid characters + + \ No newline at end of file diff --git a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.fr.xlf b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.fr.xlf index d74ffa7..4850aa5 100644 --- a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.fr.xlf +++ b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.fr.xlf @@ -227,6 +227,21 @@ Invalid Source Link: {0} + + Invalid srcsvr variable name: '{0}' + Invalid srcsvr variable name: '{0}' + + + + Variable '{0}' can't be set explicitly + Variable '{0}' can't be set explicitly + + + + Value of srcsvr variable '{0}' contains invalid characters + Value of srcsvr variable '{0}' contains invalid characters + + \ No newline at end of file diff --git a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.it.xlf b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.it.xlf index c302b75..93fbf7b 100644 --- a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.it.xlf +++ b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.it.xlf @@ -227,6 +227,21 @@ Invalid Source Link: {0} + + Invalid srcsvr variable name: '{0}' + Invalid srcsvr variable name: '{0}' + + + + Variable '{0}' can't be set explicitly + Variable '{0}' can't be set explicitly + + + + Value of srcsvr variable '{0}' contains invalid characters + Value of srcsvr variable '{0}' contains invalid characters + + \ No newline at end of file diff --git a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.ja.xlf b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.ja.xlf index 60bb10b..6b5d359 100644 --- a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.ja.xlf +++ b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.ja.xlf @@ -227,6 +227,21 @@ Invalid Source Link: {0} + + Invalid srcsvr variable name: '{0}' + Invalid srcsvr variable name: '{0}' + + + + Variable '{0}' can't be set explicitly + Variable '{0}' can't be set explicitly + + + + Value of srcsvr variable '{0}' contains invalid characters + Value of srcsvr variable '{0}' contains invalid characters + + \ No newline at end of file diff --git a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.ko.xlf b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.ko.xlf index 4fd400e..3be275c 100644 --- a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.ko.xlf +++ b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.ko.xlf @@ -227,6 +227,21 @@ Invalid Source Link: {0} + + Invalid srcsvr variable name: '{0}' + Invalid srcsvr variable name: '{0}' + + + + Variable '{0}' can't be set explicitly + Variable '{0}' can't be set explicitly + + + + Value of srcsvr variable '{0}' contains invalid characters + Value of srcsvr variable '{0}' contains invalid characters + + \ No newline at end of file diff --git a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.pl.xlf b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.pl.xlf index eb562c6..01bcdbc 100644 --- a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.pl.xlf +++ b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.pl.xlf @@ -227,6 +227,21 @@ Invalid Source Link: {0} + + Invalid srcsvr variable name: '{0}' + Invalid srcsvr variable name: '{0}' + + + + Variable '{0}' can't be set explicitly + Variable '{0}' can't be set explicitly + + + + Value of srcsvr variable '{0}' contains invalid characters + Value of srcsvr variable '{0}' contains invalid characters + + \ No newline at end of file diff --git a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.pt-BR.xlf b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.pt-BR.xlf index 4a70658..d0666ab 100644 --- a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.pt-BR.xlf +++ b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.pt-BR.xlf @@ -227,6 +227,21 @@ Invalid Source Link: {0} + + Invalid srcsvr variable name: '{0}' + Invalid srcsvr variable name: '{0}' + + + + Variable '{0}' can't be set explicitly + Variable '{0}' can't be set explicitly + + + + Value of srcsvr variable '{0}' contains invalid characters + Value of srcsvr variable '{0}' contains invalid characters + + \ No newline at end of file diff --git a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.ru.xlf b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.ru.xlf index 3dde770..1924249 100644 --- a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.ru.xlf +++ b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.ru.xlf @@ -227,6 +227,21 @@ Invalid Source Link: {0} + + Invalid srcsvr variable name: '{0}' + Invalid srcsvr variable name: '{0}' + + + + Variable '{0}' can't be set explicitly + Variable '{0}' can't be set explicitly + + + + Value of srcsvr variable '{0}' contains invalid characters + Value of srcsvr variable '{0}' contains invalid characters + + \ No newline at end of file diff --git a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.tr.xlf b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.tr.xlf index 5fc0ce9..4596448 100644 --- a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.tr.xlf +++ b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.tr.xlf @@ -227,6 +227,21 @@ Invalid Source Link: {0} + + Invalid srcsvr variable name: '{0}' + Invalid srcsvr variable name: '{0}' + + + + Variable '{0}' can't be set explicitly + Variable '{0}' can't be set explicitly + + + + Value of srcsvr variable '{0}' contains invalid characters + Value of srcsvr variable '{0}' contains invalid characters + + \ No newline at end of file diff --git a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.zh-Hans.xlf b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.zh-Hans.xlf index eb498ae..0e57fb8 100644 --- a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.zh-Hans.xlf +++ b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.zh-Hans.xlf @@ -227,6 +227,21 @@ Invalid Source Link: {0} + + Invalid srcsvr variable name: '{0}' + Invalid srcsvr variable name: '{0}' + + + + Variable '{0}' can't be set explicitly + Variable '{0}' can't be set explicitly + + + + Value of srcsvr variable '{0}' contains invalid characters + Value of srcsvr variable '{0}' contains invalid characters + + \ No newline at end of file diff --git a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.zh-Hant.xlf b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.zh-Hant.xlf index bcdd5aa..0a346e5 100644 --- a/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.zh-Hant.xlf +++ b/src/Microsoft.DiaSymReader.Converter/xlf/ConverterResources.zh-Hant.xlf @@ -227,6 +227,21 @@ Invalid Source Link: {0} + + Invalid srcsvr variable name: '{0}' + Invalid srcsvr variable name: '{0}' + + + + Variable '{0}' can't be set explicitly + Variable '{0}' can't be set explicitly + + + + Value of srcsvr variable '{0}' contains invalid characters + Value of srcsvr variable '{0}' contains invalid characters + + \ No newline at end of file diff --git a/src/Pdb2Pdb.Tests/Pdb2PdbTests.cs b/src/Pdb2Pdb.Tests/Pdb2PdbTests.cs index 84390b9..f643f73 100644 --- a/src/Pdb2Pdb.Tests/Pdb2PdbTests.cs +++ b/src/Pdb2Pdb.Tests/Pdb2PdbTests.cs @@ -1,6 +1,7 @@ // 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.Linq; using System.Reflection.Metadata; @@ -27,6 +28,9 @@ namespace Microsoft.DiaSymReader.Tools.UnitTests Assert.Throws(() => Pdb2Pdb.ParseArgs(new[] { "a.dll", "/extract", "/sourcelink" })); Assert.Throws(() => Pdb2Pdb.ParseArgs(new[] { "a.dll", "/extract", "/pdb", "a.pdb" })); Assert.Throws(() => Pdb2Pdb.ParseArgs(new[] { ">:<.dll" })); + Assert.Throws(() => Pdb2Pdb.ParseArgs(new[] { "a.dll", "/sorucelink", "/srcsvrvar", "x=y" })); + Assert.Throws(() => Pdb2Pdb.ParseArgs(new[] { "a.dll", "/srcsvrvar" })); + Assert.Throws(() => Pdb2Pdb.ParseArgs(new[] { "a.dll", "/srcsvrvar", "0=y" })); } [Fact] @@ -38,7 +42,8 @@ namespace Microsoft.DiaSymReader.Tools.UnitTests Assert.Equal("a.pdb2", args.OutPdbFilePathOpt); Assert.False(args.Extract); Assert.False(args.Verbose); - Assert.Equal(PdbConversionOptions.Default, args.Options); + Assert.False(args.Options.SuppressSourceLinkConversion); + Assert.Empty(args.Options.SrcSvrVariables); args = Pdb2Pdb.ParseArgs(new[] { "a.dll", "/extract" }); Assert.Equal("a.dll", args.PEFilePath); @@ -46,7 +51,8 @@ namespace Microsoft.DiaSymReader.Tools.UnitTests Assert.Null(args.OutPdbFilePathOpt); Assert.True(args.Extract); Assert.False(args.Verbose); - Assert.Equal(PdbConversionOptions.Default, args.Options); + Assert.False(args.Options.SuppressSourceLinkConversion); + Assert.Empty(args.Options.SrcSvrVariables); args = Pdb2Pdb.ParseArgs(new[] { "a.dll", "/extract", "/out", "b.pdb" }); Assert.Equal("a.dll", args.PEFilePath); @@ -54,7 +60,8 @@ namespace Microsoft.DiaSymReader.Tools.UnitTests Assert.Equal("b.pdb", args.OutPdbFilePathOpt); Assert.True(args.Extract); Assert.False(args.Verbose); - Assert.Equal(PdbConversionOptions.Default, args.Options); + Assert.False(args.Options.SuppressSourceLinkConversion); + Assert.Empty(args.Options.SrcSvrVariables); args = Pdb2Pdb.ParseArgs(new[] { "a.dll", "/sourcelink", "/pdb", "b.pdb", "/out", "c.pdb" }); Assert.Equal("a.dll", args.PEFilePath); @@ -62,7 +69,8 @@ namespace Microsoft.DiaSymReader.Tools.UnitTests Assert.Equal("c.pdb", args.OutPdbFilePathOpt); Assert.False(args.Extract); Assert.False(args.Verbose); - Assert.Equal(PdbConversionOptions.SuppressSourceLinkConversion, args.Options); + Assert.True(args.Options.SuppressSourceLinkConversion); + Assert.Empty(args.Options.SrcSvrVariables); args = Pdb2Pdb.ParseArgs(new[] { "a.dll", "/out", "c.pdb", "/verbose" }); Assert.Equal("a.dll", args.PEFilePath); @@ -70,7 +78,17 @@ namespace Microsoft.DiaSymReader.Tools.UnitTests Assert.Equal("c.pdb", args.OutPdbFilePathOpt); Assert.False(args.Extract); Assert.True(args.Verbose); - Assert.Equal(PdbConversionOptions.Default, args.Options); + Assert.False(args.Options.SuppressSourceLinkConversion); + Assert.Empty(args.Options.SrcSvrVariables); + + args = Pdb2Pdb.ParseArgs(new[] { "a.dll", "/out", "c.pdb", "/verbose", "/srcsvrvar", "a=b", "/srcsvrvar", "c=d" }); + Assert.Equal("a.dll", args.PEFilePath); + Assert.Null(args.PdbFilePathOpt); + Assert.Equal("c.pdb", args.OutPdbFilePathOpt); + Assert.False(args.Extract); + Assert.True(args.Verbose); + Assert.False(args.Options.SuppressSourceLinkConversion); + Assert.Equal(new[] { new KeyValuePair("a", "b"), new KeyValuePair("c", "d") }, args.Options.SrcSvrVariables); } [Fact] @@ -85,7 +103,7 @@ namespace Microsoft.DiaSymReader.Tools.UnitTests peFilePath: pe.Path, pdbFilePathOpt: pdb.Path, outPdbFilePathOpt: outPdbPath, - options: PdbConversionOptions.Default, + options: PortablePdbConversionOptions.Default, extract: false, verbose: false))); @@ -132,7 +150,7 @@ SRCSRV: end ------------------------------------------------", actual); peFilePath: pe.Path, pdbFilePathOpt: null, outPdbFilePathOpt: outPdb.Path, - options: PdbConversionOptions.SuppressSourceLinkConversion, + options: new PortablePdbConversionOptions(suppressSourceLinkConversion: true), extract: false, verbose: false))); @@ -156,7 +174,7 @@ SRCSRV: end ------------------------------------------------", actual); peFilePath: pe.Path, pdbFilePathOpt: null, outPdbFilePathOpt: outPdb.Path, - options: PdbConversionOptions.SuppressSourceLinkConversion, + options: new PortablePdbConversionOptions(suppressSourceLinkConversion: true), extract: false, verbose: false))); @@ -180,7 +198,7 @@ SRCSRV: end ------------------------------------------------", actual); peFilePath: pe.Path, pdbFilePathOpt: null, outPdbFilePathOpt: null, - options: PdbConversionOptions.Default, + options: PortablePdbConversionOptions.Default, extract: true, verbose: false))); @@ -198,7 +216,7 @@ SRCSRV: end ------------------------------------------------", actual); peFilePath: pe.Path, pdbFilePathOpt: null, outPdbFilePathOpt: outPdb.Path, - options: PdbConversionOptions.Default, + options: PortablePdbConversionOptions.Default, extract: true, verbose: false))); @@ -218,7 +236,7 @@ SRCSRV: end ------------------------------------------------", actual); peFilePath: pe.Path, pdbFilePathOpt: null, outPdbFilePathOpt: outPdb.Path, - options: PdbConversionOptions.Default, + options: PortablePdbConversionOptions.Default, extract: true, verbose: false))); @@ -237,7 +255,7 @@ SRCSRV: end ------------------------------------------------", actual); peFilePath: pe.Path, pdbFilePathOpt: null, outPdbFilePathOpt: outPdb.Path, - options: PdbConversionOptions.Default, + options: PortablePdbConversionOptions.Default, extract: false, verbose: false))); diff --git a/src/Pdb2Pdb/Pdb2Pdb.cs b/src/Pdb2Pdb/Pdb2Pdb.cs index 6c89d8a..c67e35c 100644 --- a/src/Pdb2Pdb/Pdb2Pdb.cs +++ b/src/Pdb2Pdb/Pdb2Pdb.cs @@ -1,6 +1,7 @@ // 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.Diagnostics; using System.Globalization; using System.IO; @@ -18,12 +19,14 @@ namespace Microsoft.DiaSymReader.Tools public readonly string PEFilePath; public readonly string PdbFilePathOpt; public readonly string OutPdbFilePathOpt; - public readonly PdbConversionOptions Options; + public readonly PortablePdbConversionOptions Options; public readonly bool Extract; public readonly bool Verbose; - public Args(string peFilePath, string pdbFilePathOpt, string outPdbFilePathOpt, PdbConversionOptions options, bool extract, bool verbose) + public Args(string peFilePath, string pdbFilePathOpt, string outPdbFilePathOpt, PortablePdbConversionOptions options, bool extract, bool verbose) { + Debug.Assert(options != null); + PEFilePath = peFilePath; PdbFilePathOpt = pdbFilePathOpt; OutPdbFilePathOpt = outPdbFilePathOpt; @@ -68,6 +71,7 @@ namespace Microsoft.DiaSymReader.Tools bool verbose = false; string inPdb = null; string outPdb = null; + var srcSvrVariables = new List>(); int i = 0; while (i < args.Length) @@ -98,6 +102,11 @@ namespace Microsoft.DiaSymReader.Tools outPdb = ReadValue(); break; + case "/srcsvrvar": + case "/srcsvrvariable": + srcSvrVariables.Add(ParseSrcSvrVariable(ReadValue())); + break; + default: if (peFile == null) { @@ -140,15 +149,37 @@ namespace Microsoft.DiaSymReader.Tools throw new InvalidDataException(Resources.CantSpecifyBothExtractAndPdbOptions); } - var options = default(PdbConversionOptions); - if (sourceLink) + if (sourceLink && srcSvrVariables.Count > 0) { - options |= PdbConversionOptions.SuppressSourceLinkConversion; + throw new InvalidDataException(Resources.CantSpecifyBothSrcSvrVariableAndSourcelinkOptions); + } + + PortablePdbConversionOptions options; + try + { + options = new PortablePdbConversionOptions( + suppressSourceLinkConversion: sourceLink, + srcSvrVariables: srcSvrVariables); + } + catch (ArgumentException e) + { + throw new InvalidDataException(e.Message); } return new Args(peFile, inPdb, outPdb, options, extract, verbose); } + private static KeyValuePair ParseSrcSvrVariable(string value) + { + int eq = value.IndexOf('='); + if (eq < 0) + { + return default; + } + + return new KeyValuePair(value.Substring(0, eq), value.Substring(eq + 1)); + } + // internal for testing internal static bool Convert(Args args) { diff --git a/src/Pdb2Pdb/Pdb2Pdb.nuspec b/src/Pdb2Pdb/Pdb2Pdb.nuspec index 7993413..1686444 100644 --- a/src/Pdb2Pdb/Pdb2Pdb.nuspec +++ b/src/Pdb2Pdb/Pdb2Pdb.nuspec @@ -1,7 +1,7 @@ - Pdb2Pdb + Microsoft.DiaSymReader.Pdb2Pdb $version$ Microsoft Microsoft diff --git a/src/Pdb2Pdb/Resources.resx b/src/Pdb2Pdb/Resources.resx index b751eda..04bfa58 100644 --- a/src/Pdb2Pdb/Resources.resx +++ b/src/Pdb2Pdb/Resources.resx @@ -123,6 +123,9 @@ Can't specify both /extract and /sourcelink options. + + Can't specify both /srcsvrvar and /sourcelink options. + File '{0}' doesn't contain an embedded PDB. @@ -153,11 +156,16 @@ [/pdb ] [/out ] [/extract] -/pdb Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar = Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. ]]> diff --git a/src/Pdb2Pdb/xlf/Resources.cs.xlf b/src/Pdb2Pdb/xlf/Resources.cs.xlf index 8726eb9..6c338ed 100644 --- a/src/Pdb2Pdb/xlf/Resources.cs.xlf +++ b/src/Pdb2Pdb/xlf/Resources.cs.xlf @@ -55,21 +55,31 @@ Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. @@ -80,6 +90,11 @@ Invalid PDB path in Debug Directory (file '{0}'). + + Can't specify both /srcsvrvar and /sourcelink options. + Can't specify both /srcsvrvar and /sourcelink options. + + \ No newline at end of file diff --git a/src/Pdb2Pdb/xlf/Resources.de.xlf b/src/Pdb2Pdb/xlf/Resources.de.xlf index c1ab5b1..60eb174 100644 --- a/src/Pdb2Pdb/xlf/Resources.de.xlf +++ b/src/Pdb2Pdb/xlf/Resources.de.xlf @@ -55,21 +55,31 @@ Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. @@ -80,6 +90,11 @@ Invalid PDB path in Debug Directory (file '{0}'). + + Can't specify both /srcsvrvar and /sourcelink options. + Can't specify both /srcsvrvar and /sourcelink options. + + \ No newline at end of file diff --git a/src/Pdb2Pdb/xlf/Resources.es.xlf b/src/Pdb2Pdb/xlf/Resources.es.xlf index 1a7e7b8..0e93532 100644 --- a/src/Pdb2Pdb/xlf/Resources.es.xlf +++ b/src/Pdb2Pdb/xlf/Resources.es.xlf @@ -55,21 +55,31 @@ Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. @@ -80,6 +90,11 @@ Invalid PDB path in Debug Directory (file '{0}'). + + Can't specify both /srcsvrvar and /sourcelink options. + Can't specify both /srcsvrvar and /sourcelink options. + + \ No newline at end of file diff --git a/src/Pdb2Pdb/xlf/Resources.fr.xlf b/src/Pdb2Pdb/xlf/Resources.fr.xlf index d4171f5..bca264d 100644 --- a/src/Pdb2Pdb/xlf/Resources.fr.xlf +++ b/src/Pdb2Pdb/xlf/Resources.fr.xlf @@ -55,21 +55,31 @@ Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. @@ -80,6 +90,11 @@ Invalid PDB path in Debug Directory (file '{0}'). + + Can't specify both /srcsvrvar and /sourcelink options. + Can't specify both /srcsvrvar and /sourcelink options. + + \ No newline at end of file diff --git a/src/Pdb2Pdb/xlf/Resources.it.xlf b/src/Pdb2Pdb/xlf/Resources.it.xlf index 63310ad..73cdbca 100644 --- a/src/Pdb2Pdb/xlf/Resources.it.xlf +++ b/src/Pdb2Pdb/xlf/Resources.it.xlf @@ -55,21 +55,31 @@ Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. @@ -80,6 +90,11 @@ Invalid PDB path in Debug Directory (file '{0}'). + + Can't specify both /srcsvrvar and /sourcelink options. + Can't specify both /srcsvrvar and /sourcelink options. + + \ No newline at end of file diff --git a/src/Pdb2Pdb/xlf/Resources.ja.xlf b/src/Pdb2Pdb/xlf/Resources.ja.xlf index 4a06a11..883c87b 100644 --- a/src/Pdb2Pdb/xlf/Resources.ja.xlf +++ b/src/Pdb2Pdb/xlf/Resources.ja.xlf @@ -55,21 +55,31 @@ Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. @@ -80,6 +90,11 @@ Invalid PDB path in Debug Directory (file '{0}'). + + Can't specify both /srcsvrvar and /sourcelink options. + Can't specify both /srcsvrvar and /sourcelink options. + + \ No newline at end of file diff --git a/src/Pdb2Pdb/xlf/Resources.ko.xlf b/src/Pdb2Pdb/xlf/Resources.ko.xlf index cb46c3b..d53ef99 100644 --- a/src/Pdb2Pdb/xlf/Resources.ko.xlf +++ b/src/Pdb2Pdb/xlf/Resources.ko.xlf @@ -55,21 +55,31 @@ Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. @@ -80,6 +90,11 @@ Invalid PDB path in Debug Directory (file '{0}'). + + Can't specify both /srcsvrvar and /sourcelink options. + Can't specify both /srcsvrvar and /sourcelink options. + + \ No newline at end of file diff --git a/src/Pdb2Pdb/xlf/Resources.pl.xlf b/src/Pdb2Pdb/xlf/Resources.pl.xlf index 77c1cf9..0c66e1b 100644 --- a/src/Pdb2Pdb/xlf/Resources.pl.xlf +++ b/src/Pdb2Pdb/xlf/Resources.pl.xlf @@ -55,21 +55,31 @@ Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. @@ -80,6 +90,11 @@ Invalid PDB path in Debug Directory (file '{0}'). + + Can't specify both /srcsvrvar and /sourcelink options. + Can't specify both /srcsvrvar and /sourcelink options. + + \ No newline at end of file diff --git a/src/Pdb2Pdb/xlf/Resources.pt-BR.xlf b/src/Pdb2Pdb/xlf/Resources.pt-BR.xlf index c0325ec..c7a8f45 100644 --- a/src/Pdb2Pdb/xlf/Resources.pt-BR.xlf +++ b/src/Pdb2Pdb/xlf/Resources.pt-BR.xlf @@ -55,21 +55,31 @@ Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. @@ -80,6 +90,11 @@ Invalid PDB path in Debug Directory (file '{0}'). + + Can't specify both /srcsvrvar and /sourcelink options. + Can't specify both /srcsvrvar and /sourcelink options. + + \ No newline at end of file diff --git a/src/Pdb2Pdb/xlf/Resources.ru.xlf b/src/Pdb2Pdb/xlf/Resources.ru.xlf index 5d8a817..edb0ee4 100644 --- a/src/Pdb2Pdb/xlf/Resources.ru.xlf +++ b/src/Pdb2Pdb/xlf/Resources.ru.xlf @@ -55,21 +55,31 @@ Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. @@ -80,6 +90,11 @@ Invalid PDB path in Debug Directory (file '{0}'). + + Can't specify both /srcsvrvar and /sourcelink options. + Can't specify both /srcsvrvar and /sourcelink options. + + \ No newline at end of file diff --git a/src/Pdb2Pdb/xlf/Resources.tr.xlf b/src/Pdb2Pdb/xlf/Resources.tr.xlf index 233f1d2..9df81af 100644 --- a/src/Pdb2Pdb/xlf/Resources.tr.xlf +++ b/src/Pdb2Pdb/xlf/Resources.tr.xlf @@ -55,21 +55,31 @@ Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. @@ -80,6 +90,11 @@ Invalid PDB path in Debug Directory (file '{0}'). + + Can't specify both /srcsvrvar and /sourcelink options. + Can't specify both /srcsvrvar and /sourcelink options. + + \ No newline at end of file diff --git a/src/Pdb2Pdb/xlf/Resources.zh-Hans.xlf b/src/Pdb2Pdb/xlf/Resources.zh-Hans.xlf index 29457ef..0e37ee3 100644 --- a/src/Pdb2Pdb/xlf/Resources.zh-Hans.xlf +++ b/src/Pdb2Pdb/xlf/Resources.zh-Hans.xlf @@ -55,21 +55,31 @@ Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. @@ -80,6 +90,11 @@ Invalid PDB path in Debug Directory (file '{0}'). + + Can't specify both /srcsvrvar and /sourcelink options. + Can't specify both /srcsvrvar and /sourcelink options. + + \ No newline at end of file diff --git a/src/Pdb2Pdb/xlf/Resources.zh-Hant.xlf b/src/Pdb2Pdb/xlf/Resources.zh-Hant.xlf index d4a5690..a6dacdb 100644 --- a/src/Pdb2Pdb/xlf/Resources.zh-Hant.xlf +++ b/src/Pdb2Pdb/xlf/Resources.zh-Hant.xlf @@ -55,21 +55,31 @@ Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. Usage: Pdb2Pdb <dll/exe path> [/pdb <path>] [/out <path>] [/extract] -/pdb <path> Path to the PDB to convert. If not specified explicitly, the PDB referenced by or embedded in the DLL/EXE is used. -/out <path> Output PDB path. -/extract Extract PDB embedded in the DLL/EXE. -/sourcelink Preserve Source Link when converting from Portable PDB to Windows PDB, instead of converting to srcsrv format. -/verbose Print detailed diagnostics. +/pdb <path> Path to the PDB to convert. If not specified explicitly, + the PDB referenced by or embedded in the DLL/EXE is used. +/out <path> Output PDB path. +/extract Extract PDB embedded in the DLL/EXE. +/sourcelink Preserve Source Link when converting from Portable PDB to + Windows PDB, instead of converting to srcsrv format. +/verbose Print detailed diagnostics. +/srcsvrvar <name>=<value> Add specified variable to srcsvr stream. Only applicable + when converting to Windows PDB and /sourcelink is not + specified. /extract and /pdb are mutually exclusive. @@ -80,6 +90,11 @@ Invalid PDB path in Debug Directory (file '{0}'). + + Can't specify both /srcsvrvar and /sourcelink options. + Can't specify both /srcsvrvar and /sourcelink options. + + \ No newline at end of file