diff options
author | Nelson Billing <nbilling@google.com> | 2020-08-14 18:32:45 -0700 |
---|---|---|
committer | Nelson Billing <nbilling@google.com> | 2020-08-17 22:31:50 +0000 |
commit | 9c38ab7c67e5b199e6b7ffafa27b7f463f06dedd (patch) | |
tree | 5f6081b3dc47eef23accaa325ff1aa0b5c043c36 /src/common/mac | |
parent | linux: Fix segfault when there is no section header in ELF file (diff) | |
download | breakpad-9c38ab7c67e5b199e6b7ffafa27b7f463f06dedd.tar.xz |
Add native symbol uploads to Mac OS symupload tool.
- sym-upload-v2 protocol only.
- Supports elf, dwp, debug_only, macho, dsym, pe, and pdb (with the classic mode being called 'breakpad').
Change-Id: I68c0065aec3a7ffe29b364dd9e2e1dbdb58e3e5d
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2357528
Reviewed-by: Mark Mentovai <mark@chromium.org>
Diffstat (limited to 'src/common/mac')
-rw-r--r-- | src/common/mac/SymbolCollectorClient.h | 3 | ||||
-rw-r--r-- | src/common/mac/SymbolCollectorClient.m | 12 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/common/mac/SymbolCollectorClient.h b/src/common/mac/SymbolCollectorClient.h index 1f27f23f..9e955c8e 100644 --- a/src/common/mac/SymbolCollectorClient.h +++ b/src/common/mac/SymbolCollectorClient.h @@ -95,7 +95,8 @@ typedef NS_ENUM(NSInteger, SymbolStatus) { withAPIKey:(NSString*)APIKey withUploadKey:(NSString*)uploadKey withDebugFile:(NSString*)debugFile - withDebugID:(NSString*)debugID; + withDebugID:(NSString*)debugID + withType:(NSString*)type; @end diff --git a/src/common/mac/SymbolCollectorClient.m b/src/common/mac/SymbolCollectorClient.m index f7cd9235..b135cdeb 100644 --- a/src/common/mac/SymbolCollectorClient.m +++ b/src/common/mac/SymbolCollectorClient.m @@ -77,9 +77,9 @@ [allowedDebugFileCharacters formUnionWithCharacterSet:[NSCharacterSet controlCharacterSet]]; [allowedDebugFileCharacters invert]; - NSString* escapedDebugFile = [debugFile - stringByAddingPercentEncodingWithAllowedCharacters: - allowedDebugFileCharacters]; + NSString* escapedDebugFile = + [debugFile stringByAddingPercentEncodingWithAllowedCharacters: + allowedDebugFileCharacters]; NSURL* URL = [NSURL URLWithString:[NSString @@ -189,7 +189,8 @@ withAPIKey:(NSString*)APIKey withUploadKey:(NSString*)uploadKey withDebugFile:(NSString*)debugFile - withDebugID:(NSString*)debugID { + withDebugID:(NSString*)debugID + withType:(NSString*)type { NSURL* URL = [NSURL URLWithString:[NSString stringWithFormat:@"%@/v1/uploads/%@:complete?key=%@", @@ -199,7 +200,8 @@ [NSDictionary dictionaryWithObjectsAndKeys:debugFile, @"debug_file", debugID, @"debug_id", nil]; NSDictionary* jsonDictionary = [NSDictionary - dictionaryWithObjectsAndKeys:symbolIdDictionary, @"symbol_id", nil]; + dictionaryWithObjectsAndKeys:symbolIdDictionary, @"symbol_id", type, + @"symbol_upload_type", nil]; NSError* error; NSData* jsonData = [NSJSONSerialization dataWithJSONObject:jsonDictionary |