From 09b056975dacd1f0f815ad820b6dc9913b0118a3 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 23 Jun 2020 18:55:43 -0400 Subject: 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 Reviewed-by: Mark Mentovai --- src/processor/cfi_frame_info.h | 52 +++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'src/processor/cfi_frame_info.h') diff --git a/src/processor/cfi_frame_info.h b/src/processor/cfi_frame_info.h index 90a1b3d7..2bc93336 100644 --- a/src/processor/cfi_frame_info.h +++ b/src/processor/cfi_frame_info.h @@ -72,9 +72,9 @@ class CFIFrameInfo { // Set the expression for computing a call frame address, return // address, or register's value. At least the CFA rule and the RA // rule must be set before calling FindCallerRegs. - void SetCFARule(const string &expression) { cfa_rule_ = expression; } - void SetRARule(const string &expression) { ra_rule_ = expression; } - void SetRegisterRule(const string ®ister_name, const string &expression) { + void SetCFARule(const string& expression) { cfa_rule_ = expression; } + void SetRARule(const string& expression) { ra_rule_ = expression; } + void SetRegisterRule(const string& register_name, const string& expression) { register_rules_[register_name] = expression; } @@ -96,9 +96,9 @@ class CFIFrameInfo { // These may be helpful in computing the caller's PC and stack // pointer, if their values are not explicitly specified. template - bool FindCallerRegs(const RegisterValueMap ®isters, - const MemoryRegion &memory, - RegisterValueMap *caller_registers) const; + bool FindCallerRegs(const RegisterValueMap& registers, + const MemoryRegion& memory, + RegisterValueMap* caller_registers) const; // Serialize the rules in this object into a string in the format // of STACK CFI records. @@ -148,28 +148,28 @@ class CFIRuleParser { virtual ~Handler() { } // The input specifies EXPRESSION as the CFA/RA computation rule. - virtual void CFARule(const string &expression) = 0; - virtual void RARule(const string &expression) = 0; + virtual void CFARule(const string& expression) = 0; + virtual void RARule(const string& expression) = 0; // The input specifies EXPRESSION as the recovery rule for register NAME. - virtual void RegisterRule(const string &name, const string &expression) = 0; + virtual void RegisterRule(const string& name, const string& expression) = 0; }; // Construct a parser which feeds its results to HANDLER. - CFIRuleParser(Handler *handler) : handler_(handler) { } + CFIRuleParser(Handler* handler) : handler_(handler) { } // Parse RULE_SET as a set of CFA computation and RA/register // recovery rules, as appearing in STACK CFI records. Report the // results of parsing by making the appropriate calls to handler_. // Return true if parsing was successful, false otherwise. - bool Parse(const string &rule_set); + bool Parse(const string& rule_set); private: // Report any accumulated rule to handler_ bool Report(); // The handler to which the parser reports its findings. - Handler *handler_; + Handler* handler_; // Working data. string name_, expression_; @@ -180,15 +180,15 @@ class CFIRuleParser { class CFIFrameInfoParseHandler: public CFIRuleParser::Handler { public: // Populate FRAME_INFO with the results of parsing. - CFIFrameInfoParseHandler(CFIFrameInfo *frame_info) + CFIFrameInfoParseHandler(CFIFrameInfo* frame_info) : frame_info_(frame_info) { } - void CFARule(const string &expression); - void RARule(const string &expression); - void RegisterRule(const string &name, const string &expression); + void CFARule(const string& expression); + void RARule(const string& expression); + void RegisterRule(const string& name, const string& expression); private: - CFIFrameInfo *frame_info_; + CFIFrameInfo* frame_info_; }; // A utility class template for simple 'STACK CFI'-driven stack walkers. @@ -212,14 +212,14 @@ class SimpleCFIWalker { // A structure describing one architecture register. struct RegisterSet { // The register name, as it appears in STACK CFI rules. - const char *name; + const char* name; // An alternate name that the register's value might be found // under in a register value dictionary, or NULL. When generating // names, prefer NAME to this value. It's common to list ".cfa" as // an alternative name for the stack pointer, and ".ra" as an // alternative name for the instruction pointer. - const char *alternate_name; + const char* alternate_name; // True if the callee is expected to preserve the value of this // register. If this flag is true for some register R, and the STACK @@ -240,7 +240,7 @@ class SimpleCFIWalker { // architecture's register set. REGISTER_MAP is an array of // RegisterSet structures; MAP_SIZE is the number of elements in the // array. - SimpleCFIWalker(const RegisterSet *register_map, size_t map_size) + SimpleCFIWalker(const RegisterSet* register_map, size_t map_size) : register_map_(register_map), map_size_(map_size) { } // Compute the calling frame's raw context given the callee's raw @@ -256,15 +256,15 @@ class SimpleCFIWalker { // fill in CALLER_CONTEXT with the caller's register values, and set // CALLER_VALIDITY to indicate which registers are valid in // CALLER_CONTEXT. Return true on success, or false on failure. - bool FindCallerRegisters(const MemoryRegion &memory, - const CFIFrameInfo &cfi_frame_info, - const RawContextType &callee_context, + bool FindCallerRegisters(const MemoryRegion& memory, + const CFIFrameInfo& cfi_frame_info, + const RawContextType& callee_context, int callee_validity, - RawContextType *caller_context, - int *caller_validity) const; + RawContextType* caller_context, + int* caller_validity) const; private: - const RegisterSet *register_map_; + const RegisterSet* register_map_; size_t map_size_; }; -- cgit v1.2.1