From 7279404aeaa49799230997f7e755050eeeb4b3f4 Mon Sep 17 00:00:00 2001 From: Justin Cohen Date: Mon, 8 Mar 2021 12:32:45 -0500 Subject: [PATCH] Correct native symbol upload and UUID. The auto-detection of the UUID was missing the extra "0" added for compatibility reasons. The native upload also was sending malformed HTTP. Change-Id: I8c261fc525f0f0086f269f2dee02941dd55488cb Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2739320 Reviewed-by: Nelson Billing Reviewed-by: Mark Mentovai --- src/common/mac/HTTPPutRequest.m | 8 +------- src/common/mac/dump_syms.cc | 5 ++++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/common/mac/HTTPPutRequest.m b/src/common/mac/HTTPPutRequest.m index ec67376b..f6f1400a 100644 --- a/src/common/mac/HTTPPutRequest.m +++ b/src/common/mac/HTTPPutRequest.m @@ -50,13 +50,7 @@ //============================================================================= - (NSData*)bodyData { - NSMutableData* postBody = [NSMutableData data]; - - [HTTPRequest appendFileToBodyData:postBody - withName:@"symbol_file" - withFileOrData:file_]; - - return postBody; + return [NSData dataWithContentsOfFile:file_]; } @end diff --git a/src/common/mac/dump_syms.cc b/src/common/mac/dump_syms.cc index ae69ca49..259bee20 100644 --- a/src/common/mac/dump_syms.cc +++ b/src/common/mac/dump_syms.cc @@ -307,6 +307,10 @@ string DumpSymbols::Identifier() { i = compacted.find('-', i)) compacted.erase(i, 1); + // The pdb for these IDs has an extra byte, so to make everything uniform put + // a 0 on the end of mac IDs. + compacted += "0"; + return compacted; } @@ -411,7 +415,6 @@ bool DumpSymbols::CreateEmptyModule(scoped_ptr& module) { string identifier = Identifier(); if (identifier.empty()) return false; - identifier += "0"; // Create a module to hold the debugging information. module.reset(new Module(module_name,