aboutsummaryrefslogtreecommitdiff
path: root/src/tools/windows/converter
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2020-06-23 18:55:43 -0400
committerMike Frysinger <vapier@chromium.org>2020-07-15 06:20:02 +0000
commit09b056975dacd1f0f815ad820b6dc9913b0118a3 (patch)
tree67ba67549b44e6d98b9ff2dfb3e0396e0a252b96 /src/tools/windows/converter
parentAdd support for dwarf5 line tables. (diff)
downloadbreakpad-09b056975dacd1f0f815ad820b6dc9913b0118a3.tar.xz
fix pointer style to match the style guide
We do this in a lot of places, but we're inconsistent. Normalize the code to the Google C++ style guide. Change-Id: Ic2aceab661ce8f6b993dda21b1cdf5d2198dcbbf Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2262932 Reviewed-by: Sterling Augustine <saugustine@google.com> Reviewed-by: Mark Mentovai <mark@chromium.org>
Diffstat (limited to 'src/tools/windows/converter')
-rw-r--r--src/tools/windows/converter/ms_symbol_server_converter.cc62
-rw-r--r--src/tools/windows/converter/ms_symbol_server_converter.h40
2 files changed, 51 insertions, 51 deletions
diff --git a/src/tools/windows/converter/ms_symbol_server_converter.cc b/src/tools/windows/converter/ms_symbol_server_converter.cc
index 2b40faee..102d06fd 100644
--- a/src/tools/windows/converter/ms_symbol_server_converter.cc
+++ b/src/tools/windows/converter/ms_symbol_server_converter.cc
@@ -92,7 +92,7 @@ namespace google_breakpad {
#endif // _MSC_VER >= 1400
bool GUIDOrSignatureIdentifier::InitializeFromString(
- const string &identifier) {
+ const string& identifier) {
type_ = TYPE_NONE;
size_t length = identifier.length();
@@ -128,7 +128,7 @@ bool GUIDOrSignatureIdentifier::InitializeFromString(
#undef SSCANF
MSSymbolServerConverter::MSSymbolServerConverter(
- const string &local_cache, const vector<string> &symbol_servers)
+ const string& local_cache, const vector<string>& symbol_servers)
: symbol_path_(),
fail_dns_(false),
fail_timeout_(false),
@@ -184,7 +184,7 @@ class AutoSymSrv {
}
}
- bool Initialize(HANDLE process, char *path, bool invade_process) {
+ bool Initialize(HANDLE process, char* path, bool invade_process) {
process_ = process;
// TODO(nbilling): Figure out why dbghelp.dll is being loaded from
@@ -240,7 +240,7 @@ class AutoSymSrv {
// are supported by calling Delete().
class AutoDeleter {
public:
- explicit AutoDeleter(const string &path) : path_(path) {}
+ explicit AutoDeleter(const string& path) : path_(path) {}
~AutoDeleter() {
int error;
@@ -270,10 +270,10 @@ class AutoDeleter {
};
MSSymbolServerConverter::LocateResult
-MSSymbolServerConverter::LocateFile(const string &debug_or_code_file,
- const string &debug_or_code_id,
- const string &version,
- string *file_name) {
+MSSymbolServerConverter::LocateFile(const string& debug_or_code_file,
+ const string& debug_or_code_id,
+ const string& version,
+ string* file_name) {
assert(file_name);
file_name->clear();
@@ -290,7 +290,7 @@ MSSymbolServerConverter::LocateFile(const string &debug_or_code_file,
HANDLE process = GetCurrentProcess(); // CloseHandle is not needed.
AutoSymSrv symsrv;
if (!symsrv.Initialize(process,
- const_cast<char *>(symbol_path_.c_str()),
+ const_cast<char*>(symbol_path_.c_str()),
false)) {
fprintf(stderr, "LocateFile: SymInitialize: error %lu for %s %s %s\n",
GetLastError(),
@@ -326,8 +326,8 @@ MSSymbolServerConverter::LocateFile(const string &debug_or_code_file,
char path[MAX_PATH];
if (!SymFindFileInPath(
process, NULL,
- const_cast<char *>(debug_or_code_file.c_str()),
- const_cast<void *>(identifier.guid_or_signature_pointer()),
+ const_cast<char*>(debug_or_code_file.c_str()),
+ const_cast<void*>(identifier.guid_or_signature_pointer()),
identifier.age(), 0,
identifier.type() == GUIDOrSignatureIdentifier::TYPE_GUID ?
SSRVOPT_GUIDPTR : SSRVOPT_DWORDPTR,
@@ -393,15 +393,15 @@ MSSymbolServerConverter::LocateFile(const string &debug_or_code_file,
MSSymbolServerConverter::LocateResult
-MSSymbolServerConverter::LocatePEFile(const MissingSymbolInfo &missing,
- string *pe_file) {
+MSSymbolServerConverter::LocatePEFile(const MissingSymbolInfo& missing,
+ string* pe_file) {
return LocateFile(missing.code_file, missing.code_identifier,
missing.version, pe_file);
}
MSSymbolServerConverter::LocateResult
-MSSymbolServerConverter::LocateSymbolFile(const MissingSymbolInfo &missing,
- string *symbol_file) {
+MSSymbolServerConverter::LocateSymbolFile(const MissingSymbolInfo& missing,
+ string* symbol_file) {
return LocateFile(missing.debug_file, missing.debug_identifier,
missing.version, symbol_file);
}
@@ -412,13 +412,13 @@ BOOL CALLBACK MSSymbolServerConverter::SymCallback(HANDLE process,
ULONG action,
ULONG64 data,
ULONG64 context) {
- MSSymbolServerConverter *self =
- reinterpret_cast<MSSymbolServerConverter *>(context);
+ MSSymbolServerConverter* self =
+ reinterpret_cast<MSSymbolServerConverter*>(context);
switch (action) {
case CBA_EVENT: {
- IMAGEHLP_CBA_EVENT *cba_event =
- reinterpret_cast<IMAGEHLP_CBA_EVENT *>(data);
+ IMAGEHLP_CBA_EVENT* cba_event =
+ reinterpret_cast<IMAGEHLP_CBA_EVENT*>(data);
// Put the string into a string object to be able to use string::find
// for substring matching. This is important because the not-found
@@ -429,8 +429,8 @@ BOOL CALLBACK MSSymbolServerConverter::SymCallback(HANDLE process,
// desc_action maps strings (in desc) to boolean pointers that are to
// be set to true if the string matches.
struct desc_action {
- const char *desc; // The substring to match.
- bool *action; // On match, this pointer will be set to true.
+ const char* desc; // The substring to match.
+ bool* action; // On match, this pointer will be set to true.
};
static const desc_action desc_actions[] = {
@@ -478,7 +478,7 @@ BOOL CALLBACK MSSymbolServerConverter::SymCallback(HANDLE process,
// static
BOOL CALLBACK MSSymbolServerConverter::SymFindFileInPathCallback(
- const char *filename, void *context) {
+ const char* filename, void* context) {
// FALSE ends the search, indicating that the located symbol file is
// satisfactory.
return FALSE;
@@ -486,12 +486,12 @@ BOOL CALLBACK MSSymbolServerConverter::SymFindFileInPathCallback(
MSSymbolServerConverter::LocateResult
MSSymbolServerConverter::LocateAndConvertSymbolFile(
- const MissingSymbolInfo &missing,
+ const MissingSymbolInfo& missing,
bool keep_symbol_file,
bool keep_pe_file,
- string *converted_symbol_file,
- string *symbol_file,
- string *out_pe_file) {
+ string* converted_symbol_file,
+ string* symbol_file,
+ string* out_pe_file) {
assert(converted_symbol_file);
converted_symbol_file->clear();
if (symbol_file) {
@@ -580,7 +580,7 @@ MSSymbolServerConverter::LocateAndConvertSymbolFile(
*converted_symbol_file = pdb_file.substr(0, pdb_file.length() - 4) + ".sym";
- FILE *converted_output = NULL;
+ FILE* converted_output = NULL;
#if _MSC_VER >= 1400 // MSVC 2005/8
errno_t err;
if ((err = fopen_s(&converted_output, converted_symbol_file->c_str(), "w"))
@@ -634,10 +634,10 @@ MSSymbolServerConverter::LocateAndConvertSymbolFile(
MSSymbolServerConverter::LocateResult
MSSymbolServerConverter::LocateAndConvertPEFile(
- const MissingSymbolInfo &missing,
+ const MissingSymbolInfo& missing,
bool keep_pe_file,
- string *converted_symbol_file,
- string *out_pe_file) {
+ string* converted_symbol_file,
+ string* out_pe_file) {
assert(converted_symbol_file);
converted_symbol_file->clear();
@@ -676,7 +676,7 @@ MSSymbolServerConverter::LocateAndConvertPEFile(
*converted_symbol_file = pe_file.substr(0, pe_file.length() - 4) + ".sym";
- FILE *converted_output = NULL;
+ FILE* converted_output = NULL;
#if _MSC_VER >= 1400 // MSVC 2005/8
errno_t err;
if ((err = fopen_s(&converted_output, converted_symbol_file->c_str(), "w"))
diff --git a/src/tools/windows/converter/ms_symbol_server_converter.h b/src/tools/windows/converter/ms_symbol_server_converter.h
index 401f7c34..40d65d52 100644
--- a/src/tools/windows/converter/ms_symbol_server_converter.h
+++ b/src/tools/windows/converter/ms_symbol_server_converter.h
@@ -101,13 +101,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_;
@@ -141,23 +141,23 @@ 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);
+ MSSymbolServerConverter(const string& local_cache,
+ const vector<string>& symbol_servers);
// 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 +170,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 +188,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 +199,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 +215,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.