mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-03-14 04:42:57 +00:00
Add support for product_name in Mac sym_upload v2
Change-Id: I6fab9f62434fd19eb7aea4a66f0dd809af57e595 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3436859 Reviewed-by: Nelson Billing <nbilling@google.com> Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
committed by
Nelson Billing
parent
3123f102ff
commit
7685201906
@@ -73,6 +73,7 @@ typedef struct {
|
||||
NSString* type;
|
||||
NSString* codeFile;
|
||||
NSString* debugID;
|
||||
NSString* productName;
|
||||
} Options;
|
||||
|
||||
//=============================================================================
|
||||
@@ -212,7 +213,8 @@ static void StartSymUploadProtocolV2(Options* options,
|
||||
withUploadKey:[URLResponse uploadKey]
|
||||
withDebugFile:debugFile
|
||||
withDebugID:debugID
|
||||
withType:options->type];
|
||||
withType:options->type
|
||||
withProductName:options->productName];
|
||||
[URLResponse release];
|
||||
if (completeUploadResult == CompleteUploadResultError) {
|
||||
fprintf(stdout, "Failed to complete upload.\n");
|
||||
@@ -271,18 +273,20 @@ static void Usage(int argc, const char* argv[]) {
|
||||
"[Only in sym-upload-v2 protocol mode]\n");
|
||||
fprintf(
|
||||
stderr,
|
||||
"-t:\t <symbol-type> Explicitly set symbol upload type ("
|
||||
"\t-t: <symbol-type> Explicitly set symbol upload type ("
|
||||
"default is 'breakpad').\n"
|
||||
"\t One of ['breakpad', 'elf', 'pe', 'macho', 'debug_only', 'dwp', "
|
||||
"'dsym', 'pdb'].\n"
|
||||
"\t Note: When this flag is set to anything other than 'breakpad', then "
|
||||
"the '-c' and '-i' flags must also be set.\n");
|
||||
fprintf(stderr, "-c:\t <code-file> Explicitly set 'code_file' for symbol "
|
||||
fprintf(stderr, "\t-c: <code-file> Explicitly set 'code_file' for symbol "
|
||||
"upload (basename of executable).\n");
|
||||
fprintf(stderr, "-i:\t <debug-id> Explicitly set 'debug_id' for symbol "
|
||||
fprintf(stderr, "\t-i: <debug-id> Explicitly set 'debug_id' for symbol "
|
||||
"upload (typically build ID of executable). The debug-id for "
|
||||
"symbol-types 'dsym' and 'macho' will be determined "
|
||||
"automatically. \n");
|
||||
fprintf(stderr, "\t-n: <product-name> Optionally set 'product_name' for "
|
||||
"symbol upload\n");
|
||||
fprintf(stderr, "\t-h: Usage\n");
|
||||
fprintf(stderr, "\t-?: Usage\n");
|
||||
fprintf(stderr, "\n");
|
||||
@@ -329,11 +333,12 @@ static void SetupOptions(int argc, const char* argv[], Options* options) {
|
||||
options->codeFile = nil;
|
||||
options->debugID = nil;
|
||||
options->force = NO;
|
||||
options->productName = nil;
|
||||
|
||||
extern int optind;
|
||||
int ch;
|
||||
|
||||
while ((ch = getopt(argc, (char* const*)argv, "p:k:t:c:i:hf?")) != -1) {
|
||||
while ((ch = getopt(argc, (char* const*)argv, "p:k:t:c:i:n:hf?")) != -1) {
|
||||
switch (ch) {
|
||||
case 'p':
|
||||
if (strcmp(optarg, "sym-upload-v2") == 0) {
|
||||
@@ -362,12 +367,15 @@ static void SetupOptions(int argc, const char* argv[], Options* options) {
|
||||
case 'c':
|
||||
options->codeFile = [NSString stringWithCString:optarg
|
||||
encoding:NSASCIIStringEncoding];
|
||||
;
|
||||
break;
|
||||
case 'i':
|
||||
options->debugID = [NSString stringWithCString:optarg
|
||||
encoding:NSASCIIStringEncoding];
|
||||
;
|
||||
break;
|
||||
case 'n':
|
||||
options->productName =
|
||||
[NSString stringWithCString:optarg
|
||||
encoding:NSASCIIStringEncoding];
|
||||
break;
|
||||
case 'f':
|
||||
options->force = YES;
|
||||
|
||||
Reference in New Issue
Block a user