mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-31 19:54:30 +01:00
Add symbol type option to SymUploadV2ProtocolSend.
Change-Id: Ia2eadae56c7f879ddb2212e4018024a5c04634aa Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3670054 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
This commit is contained in:
parent
bee636cea4
commit
678d69cd78
6 changed files with 41 additions and 15 deletions
|
|
@ -20,6 +20,7 @@ static bool SymUploadV2ProtocolSend(const wchar_t* api_url,
|
|||
const wstring& debug_file,
|
||||
const wstring& debug_id,
|
||||
const wstring& symbol_filename,
|
||||
const wstring& symbol_type,
|
||||
bool force) {
|
||||
wstring url(api_url);
|
||||
wstring key(api_key);
|
||||
|
|
@ -69,7 +70,7 @@ static bool SymUploadV2ProtocolSend(const wchar_t* api_url,
|
|||
|
||||
CompleteUploadResult completeUploadResult =
|
||||
SymbolCollectorClient::CompleteUpload(url, key, timeout_ms, upload_key,
|
||||
debug_file, debug_id);
|
||||
debug_file, debug_id, symbol_type);
|
||||
if (completeUploadResult == CompleteUploadResult::Error) {
|
||||
wprintf(L"Failed to complete upload.\n");
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -37,14 +37,26 @@ namespace google_breakpad {
|
|||
// Sends file at |symbol_filename| using the sym-upload-v2 protocol to
|
||||
// |api_url| using key |api_key|, and using identifiers |debug_file| and
|
||||
// |debug_id|. |timeout_ms| is the number of milliseconds to wait before
|
||||
// terminating the upload attempt. If |force| is set then it will overwrite an
|
||||
// existing file with the same |debug_file| and |debug_id| in the store.
|
||||
// terminating the upload attempt. |symbol_type| is the type of the symbol
|
||||
// file, which is one of:
|
||||
// "BREAKPAD"
|
||||
// "ELF"
|
||||
// "PE"
|
||||
// "MACHO"
|
||||
// "DEBUG_ONLY"
|
||||
// "DWP"
|
||||
// "DSYM"
|
||||
// "PDB"
|
||||
// "SOURCE_MAP"
|
||||
// If |force| is set then it will overwrite an existing file with the
|
||||
// same |debug_file| and |debug_id| in the store.
|
||||
bool SymUploadV2ProtocolSend(const wchar_t* api_url,
|
||||
const wchar_t* api_key,
|
||||
int* timeout_ms,
|
||||
const std::wstring& debug_file,
|
||||
const std::wstring& debug_id,
|
||||
const std::wstring& symbol_filename,
|
||||
const std::wstring& symbol_type,
|
||||
bool force);
|
||||
|
||||
} // namespace google_breakpad
|
||||
|
|
|
|||
|
|
@ -70,15 +70,23 @@ namespace google_breakpad {
|
|||
int* timeout_ms,
|
||||
const wstring& upload_key,
|
||||
const wstring& debug_file,
|
||||
const wstring& debug_id) {
|
||||
const wstring& debug_id,
|
||||
const wstring& type) {
|
||||
wstring url = api_url +
|
||||
L"/v1/uploads/" + upload_key + L":complete"
|
||||
L"?key=" + api_key;
|
||||
wstring body =
|
||||
L"{ symbol_id: {"
|
||||
L"debug_file: \"" + debug_file + L"\", "
|
||||
L"debug_id: \"" + debug_id + L"\" "
|
||||
L"debug_file: \"" +
|
||||
debug_file +
|
||||
L"\", "
|
||||
L"debug_id: \"" +
|
||||
debug_id +
|
||||
L"\" "
|
||||
L"}, "
|
||||
L"symbol_upload_type: \"" +
|
||||
type +
|
||||
L"\", "
|
||||
L"use_async_processing: true }";
|
||||
wstring response;
|
||||
int response_code;
|
||||
|
|
|
|||
|
|
@ -69,13 +69,13 @@ namespace google_breakpad {
|
|||
|
||||
// Notify the API that symbol file upload is finished and its contents
|
||||
// are ready to be read and/or used for further processing.
|
||||
static CompleteUploadResult CompleteUpload(
|
||||
wstring& api_url,
|
||||
wstring& api_key,
|
||||
int* timeout_ms,
|
||||
const wstring& upload_key,
|
||||
const wstring& debug_file,
|
||||
const wstring& debug_id);
|
||||
static CompleteUploadResult CompleteUpload(wstring& api_url,
|
||||
wstring& api_key,
|
||||
int* timeout_ms,
|
||||
const wstring& upload_key,
|
||||
const wstring& debug_file,
|
||||
const wstring& debug_id,
|
||||
const wstring& type);
|
||||
|
||||
// Returns whether or not a symbol file corresponding to the debug_file/
|
||||
// debug_id pair is already present in symbol storage.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue