From a1d0e5515e0eb706cb530ce1b9f285a6b8afc821 Mon Sep 17 00:00:00 2001 From: Ryan Long Date: Wed, 28 Jul 2021 13:20:34 -0400 Subject: Remove SymbolsToAnalyze global variable - Removed SymbolsToAnalyze from app_common and replaced it with the symbolsToAnalyze_m member variable in DesiredSymbols, GcovData, and ObjdumpProcessor - Added a parameter to constructors to initialize symbolsToAnalyze_m - Moved the definition of objdumpLine_t out of ObjdumpProcessor to make it work with DesiredSymbols --- tester/covoar/ObjdumpProcessor.h | 90 ++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 40 deletions(-) (limited to 'tester/covoar/ObjdumpProcessor.h') diff --git a/tester/covoar/ObjdumpProcessor.h b/tester/covoar/ObjdumpProcessor.h index d60a768..53671c6 100644 --- a/tester/covoar/ObjdumpProcessor.h +++ b/tester/covoar/ObjdumpProcessor.h @@ -12,11 +12,54 @@ #include "ExecutableInfo.h" #include "TargetBase.h" +#include "DesiredSymbols.h" #include "rld-process.h" namespace Coverage { + class DesiredSymbols; + class ExecutableInfo; + + /*! + * This type defines the elements of an objdump line. + */ + struct objdumpLine_t { + /*! + * This member variable contains the actual line from the object dump. + */ + std::string line; + + /*! + * This member variable contains the address from the object dump line. + */ + uint32_t address; + + /*! + * This member variable contains an indication of whether the line + * is an instruction. + */ + bool isInstruction; + + /*! + * This member variable contains an indication of whether the line + * is a nop instruction. + */ + bool isNop; + + /*! + * This member variable contains the size of the nop instruction. + */ + int nopSize; + + /*! + * This member variable contains an indication of whether the line + * is a branch instruction. + */ + bool isBranch; + + }; + /*! @class ObjdumpProcessor * * This class implements the functionality which reads the output of @@ -31,45 +74,6 @@ namespace Coverage { public: - /*! - * This type defines the elements of an objdump line. - */ - typedef struct { - /*! - * This member variable contains the actual line from the object dump. - */ - std::string line; - - /*! - * This member variable contains the address from the object dump line. - */ - uint32_t address; - - /*! - * This member variable contains an indication of whether the line - * is an instruction. - */ - bool isInstruction; - - /*! - * This member variable contains an indication of whether the line - * is a nop instruction. - */ - bool isNop; - - /*! - * This member variable contains the size of the nop instruction. - */ - int nopSize; - - /*! - * This member variable contains an indication of whether the line - * is a branch instruction. - */ - bool isBranch; - - } objdumpLine_t; - /*! * This object defines a list of object dump lines * for a file. @@ -86,7 +90,9 @@ namespace Coverage { /*! * This method constructs an ObjdumpProcessor instance. */ - ObjdumpProcessor(); + ObjdumpProcessor( + DesiredSymbols& symbolsToAnalyze + ); /*! * This method destructs an ObjdumpProcessor instance. @@ -169,6 +175,10 @@ namespace Coverage { int& size ); + /*! + * This member variable contains the symbols to be analyzed + */ + DesiredSymbols& symbolsToAnalyze_m; }; } #endif -- cgit v1.2.3