aboutsummaryrefslogtreecommitdiff
path: root/src/tools/windows/converter/ms_symbol_server_converter.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2023-08-11 00:52:33 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-08-11 00:52:33 +0000
commitc9c160dbfd52b61faae9473c1b18c1a0f7869908 (patch)
treef98d11d6a158167e19fc9141c79d877280a616a6 /src/tools/windows/converter/ms_symbol_server_converter.h
parent8d0176459cfc11e28e9427a7eadcf7a42f654f62 (diff)
parent4e7c6460d73c00031288165da053692764abbeb1 (diff)
downloadgoogle-breakpad-c9c160dbfd52b61faae9473c1b18c1a0f7869908.tar.gz
Upgrade google-breakpad to v2023.01.27 am: 332a4371ed am: c3c25b3748 am: 4e7c6460d7
Original change: https://android-review.googlesource.com/c/platform/external/google-breakpad/+/2704174 Change-Id: I2d2b4a054618219b535cae768882f677ca986b75 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'src/tools/windows/converter/ms_symbol_server_converter.h')
-rw-r--r--src/tools/windows/converter/ms_symbol_server_converter.h59
1 files changed, 33 insertions, 26 deletions
diff --git a/src/tools/windows/converter/ms_symbol_server_converter.h b/src/tools/windows/converter/ms_symbol_server_converter.h
index 401f7c34..ffdea7c0 100644
--- a/src/tools/windows/converter/ms_symbol_server_converter.h
+++ b/src/tools/windows/converter/ms_symbol_server_converter.h
@@ -1,5 +1,4 @@
-// Copyright (c) 2007, Google Inc.
-// All rights reserved.
+// Copyright 2007 Google LLC
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -11,7 +10,7 @@
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
-// * Neither the name of Google Inc. nor the names of its
+// * Neither the name of Google LLC nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
@@ -101,13 +100,13 @@ class GUIDOrSignatureIdentifier {
// component fields: either a GUID and age, or signature and age. If
// successful, sets the relevant fields in the object, including the type
// field, and returns true. On error, returns false.
- bool InitializeFromString(const string &identifier);
+ bool InitializeFromString(const string& identifier);
GUIDOrSignatureType type() const { return type_; }
GUID guid() const { return guid_; }
DWORD signature() const { return signature_; }
int age() const { return age_; }
- const void *guid_or_signature_pointer() const { return &guid_; }
+ const void* guid_or_signature_pointer() const { return &guid_; }
private:
GUIDOrSignatureType type_;
@@ -127,9 +126,10 @@ class MSSymbolServerConverter {
public:
enum LocateResult {
LOCATE_FAILURE = 0,
- LOCATE_NOT_FOUND, // Authoritative: the file is not present.
- LOCATE_RETRY, // Transient (network?) error, try again later.
- LOCATE_SUCCESS
+ LOCATE_NOT_FOUND, // Authoritative: the file is not present.
+ LOCATE_RETRY, // Transient (network?) error, try again later.
+ LOCATE_SUCCESS,
+ LOCATE_HTTP_HTTPS_REDIR
};
// Create a new object. local_cache is the location (pathname) of a local
@@ -141,23 +141,26 @@ class MSSymbolServerConverter {
// store to try. The vector must contain at least one string. None of the
// strings passed to this constructor may contain asterisk ('*') or semicolon
// (';') characters, as the symbol engine uses these characters as separators.
- MSSymbolServerConverter(const string &local_cache,
- const vector<string> &symbol_servers);
+ // If |trace_symsrv| is set then callbacks from SymSrv will be logged to
+ // stderr.
+ MSSymbolServerConverter(const string& local_cache,
+ const vector<string>& symbol_servers,
+ bool trace_symsrv);
// Locates the PE file (DLL or EXE) specified by the identifying information
// in |missing|, by checking the symbol stores identified when the object
// was created. When returning LOCATE_SUCCESS, pe_file is set to
// the pathname of the decompressed PE file as it is stored in the
// local cache.
- LocateResult LocatePEFile(const MissingSymbolInfo &missing, string *pe_file);
+ LocateResult LocatePEFile(const MissingSymbolInfo& missing, string* pe_file);
// Locates the symbol file specified by the identifying information in
// |missing|, by checking the symbol stores identified when the object
// was created. When returning LOCATE_SUCCESS, symbol_file is set to
// the pathname of the decompressed symbol file as it is stored in the
// local cache.
- LocateResult LocateSymbolFile(const MissingSymbolInfo &missing,
- string *symbol_file);
+ LocateResult LocateSymbolFile(const MissingSymbolInfo& missing,
+ string* symbol_file);
// Calls LocateSymbolFile and converts the returned symbol file to the
// dumped-symbol format, storing it adjacent to the symbol file. The
@@ -170,12 +173,12 @@ class MSSymbolServerConverter {
// is desired, set |keep_symbol_file| and |keep_pe_file| to false to indicate
// that the original symbol file (pdb) and executable file (exe, dll) should
// be deleted after conversion.
- LocateResult LocateAndConvertSymbolFile(const MissingSymbolInfo &missing,
+ LocateResult LocateAndConvertSymbolFile(const MissingSymbolInfo& missing,
bool keep_symbol_file,
bool keep_pe_file,
- string *converted_symbol_file,
- string *symbol_file,
- string *pe_file);
+ string* converted_symbol_file,
+ string* symbol_file,
+ string* pe_file);
// Calls LocatePEFile and converts the returned PE file to the
// dumped-symbol format, storing it adjacent to the PE file. The
@@ -188,10 +191,10 @@ class MSSymbolServerConverter {
// to false to indicate that the executable file (exe, dll) should be deleted
// after conversion.
// NOTE: Currrently only supports x64 PEs.
- LocateResult LocateAndConvertPEFile(const MissingSymbolInfo &missing,
- bool keep_pe_file,
- string *converted_symbol_file,
- string *pe_file);
+ LocateResult LocateAndConvertPEFile(const MissingSymbolInfo& missing,
+ bool keep_pe_file,
+ string* converted_symbol_file,
+ string* pe_file);
private:
// Locates the PDB or PE file (DLL or EXE) specified by the identifying
@@ -199,9 +202,9 @@ class MSSymbolServerConverter {
// the symbol stores identified when the object was created. When
// returning LOCATE_SUCCESS, file_name is set to the pathname of the
// decompressed PDB or PE file file as it is stored in the local cache.
- LocateResult LocateFile(const string &debug_or_code_file,
- const string &debug_or_code_id,
- const string &version, string *file_name);
+ LocateResult LocateFile(const string& debug_or_code_file,
+ const string& debug_or_code_id,
+ const string& version, string* file_name);
// Called by various SymSrv functions to report status as progress is made
// and to allow the callback to influence processing. Messages sent to this
@@ -215,8 +218,8 @@ class MSSymbolServerConverter {
// SymFindFileInPath actually seems to accept NULL for a callback function
// and behave properly for our needs in that case, but the documentation
// doesn't mention it, so this little callback is provided.
- static BOOL CALLBACK SymFindFileInPathCallback(const char *filename,
- void *context);
+ static BOOL CALLBACK SymFindFileInPathCallback(const char* filename,
+ void* context);
// The search path used by SymSrv, built based on the arguments to the
// constructor.
@@ -226,8 +229,12 @@ class MSSymbolServerConverter {
// SymFindFileInPath fails for an expected reason.
bool fail_dns_; // DNS failures (fail_not_found_ will also be set).
bool fail_timeout_; // Timeouts (fail_not_found_ will also be set).
+ bool fail_http_https_redir_; // Bad URL-- we should be using HTTPS.
bool fail_not_found_; // The file could not be found. If this is the only
// fail_* member set, then it is authoritative.
+
+ // If set then callbacks from SymSrv will be logged to stderr.
+ bool trace_symsrv_;
};
} // namespace google_breakpad