Add parameter --product to symupload.exe
Adding an optional parameter --product to symupload.exe. If specified it will be passed to the symbol server as POST parameter 'product'. As part of this, I'm also fixing: - Removed the .vcproj file as it can be generated from the .gyp file on demand. - error C4335: Mac file format detected. Fixed the line endings for omap.cc and dia_util.cc. - warning C4003: not enough actual parameters for macro 'max' Symupload.exe was compiled using MSVS 2013 and DIA SDK 12.0. Review URL: https://breakpad.appspot.com/9734002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1402 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
6690554c4b
commit
e469f8cf4b
@ -496,6 +496,8 @@ bool PDBSourceLineWriter::PrintFunctions() {
|
||||
return true;
|
||||
}
|
||||
|
||||
#undef max
|
||||
|
||||
bool PDBSourceLineWriter::PrintFrameDataUsingPDB() {
|
||||
// It would be nice if it were possible to output frame data alongside the
|
||||
// associated function, as is done with line numbers, but the DIA API
|
||||
|
Binary file not shown.
@ -36,6 +36,7 @@
|
||||
// debug_identifier: the debug file's identifier, usually consisting of
|
||||
// the guid and age embedded in the pdb, e.g.
|
||||
// "11111111BBBB3333DDDD555555555555F"
|
||||
// product: the HTTP-friendly product name, e.g. "MyApp"
|
||||
// version: the file version of the module, e.g. "1.2.3.4"
|
||||
// os: the operating system that the module was built for, always
|
||||
// "windows" in this implementation.
|
||||
@ -154,24 +155,36 @@ static bool DumpSymbolsToTempFile(const wchar_t *file,
|
||||
}
|
||||
|
||||
__declspec(noreturn) void printUsageAndExit() {
|
||||
wprintf(L"Usage: symupload [--timeout NN] <file.exe|file.dll> "
|
||||
L"<symbol upload URL> [...<symbol upload URLs>]\n\n");
|
||||
wprintf(L"Timeout is in milliseconds, or can be 0 to be unlimited\n\n");
|
||||
wprintf(L"Example:\n\n\tsymupload.exe --timeout 0 chrome.dll "
|
||||
L"http://no.free.symbol.server.for.you\n");
|
||||
wprintf(L"Usage:\n\n"
|
||||
L" symupload [--timeout NN] [--product product_name] ^\n"
|
||||
L" <file.exe|file.dll> <symbol upload URL> ^\n"
|
||||
L" [...<symbol upload URLs>]\n\n");
|
||||
wprintf(L" - Timeout is in milliseconds, or can be 0 to be unlimited.\n");
|
||||
wprintf(L" - product_name is an HTTP-friendly product name. It must only\n"
|
||||
L" contain an ascii subset: alphanumeric and punctuation.\n"
|
||||
L" This string is case-sensitive.\n\n");
|
||||
wprintf(L"Example:\n\n"
|
||||
L" symupload.exe --timeout 0 --product Chrome ^\n"
|
||||
L" chrome.dll http://no.free.symbol.server.for.you\n");
|
||||
exit(0);
|
||||
}
|
||||
int wmain(int argc, wchar_t *argv[]) {
|
||||
const wchar_t *module;
|
||||
const wchar_t *product = nullptr;
|
||||
int timeout = -1;
|
||||
int currentarg = 1;
|
||||
if (argc > 2) {
|
||||
if (!wcscmp(L"--timeout", argv[1])) {
|
||||
timeout = _wtoi(argv[2]);
|
||||
currentarg = 3;
|
||||
while (argc > currentarg + 1) {
|
||||
if (!wcscmp(L"--timeout", argv[currentarg])) {
|
||||
timeout = _wtoi(argv[currentarg + 1]);
|
||||
currentarg += 2;
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
printUsageAndExit();
|
||||
if (!wcscmp(L"--product", argv[currentarg])) {
|
||||
product = argv[currentarg + 1];
|
||||
currentarg += 2;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (argc >= currentarg + 2)
|
||||
@ -195,6 +208,17 @@ int wmain(int argc, wchar_t *argv[]) {
|
||||
parameters[L"os"] = L"windows"; // This version of symupload is Windows-only
|
||||
parameters[L"cpu"] = pdb_info.cpu;
|
||||
|
||||
// Don't make a missing product name a hard error. Issue a warning and let
|
||||
// the server decide whether to reject files without product name.
|
||||
if (product) {
|
||||
parameters[L"product"] = product;
|
||||
} else {
|
||||
fwprintf(
|
||||
stderr,
|
||||
L"Warning: No product name (flag --product) was specified for %s\n",
|
||||
module);
|
||||
}
|
||||
|
||||
// Don't make a missing version a hard error. Issue a warning, and let the
|
||||
// server decide whether to reject files without versions.
|
||||
wstring file_version;
|
||||
@ -207,12 +231,15 @@ int wmain(int argc, wchar_t *argv[]) {
|
||||
bool success = true;
|
||||
|
||||
while (currentarg < argc) {
|
||||
int response_code;
|
||||
if (!HTTPUpload::SendRequest(argv[currentarg], parameters,
|
||||
symbol_file, L"symbol_file",
|
||||
timeout == -1 ? NULL : &timeout,
|
||||
NULL, NULL)) {
|
||||
nullptr, &response_code)) {
|
||||
success = false;
|
||||
fwprintf(stderr, L"Symbol file upload to %s failed\n", argv[currentarg]);
|
||||
fwprintf(stderr,
|
||||
L"Symbol file upload to %s failed. Response code = %ld\n",
|
||||
argv[currentarg], response_code);
|
||||
}
|
||||
currentarg++;
|
||||
}
|
||||
|
@ -1,251 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="symupload"
|
||||
ProjectGUID="{E156ED87-9DE9-47C8-94EC-A5A9CDD65E18}"
|
||||
RootNamespace="symupload"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""$(VSInstallDir)\DIA SDK\include";..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_LEAN_AND_MEAN"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies=""$(VSInstallDir)\DIA SDK\lib\diaguids.lib" wininet.lib version.lib imagehlp.lib"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(VSInstallDir)\DIA SDK\include";..\..\.."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_LEAN_AND_MEAN"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies=""$(VSInstallDir)\DIA SDK\lib\diaguids.lib" wininet.lib version.lib imagehlp.lib"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\common\windows\dia_util.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\common\windows\guid_string.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\common\windows\http_upload.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\common\windows\omap_internal.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\common\windows\omap.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\common\windows\pdb_source_line_writer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\common\windows\string_utils-inl.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\common\windows\dia_util.cc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\common\windows\guid_string.cc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\common\windows\http_upload.cc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\common\windows\omap.cc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\common\windows\pdb_source_line_writer.cc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\common\windows\string_utils.cc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\symupload.cc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
Loading…
x
Reference in New Issue
Block a user