diff options
Diffstat (limited to '3rdParty/Breakpad/src/common/module.h')
-rw-r--r-- | 3rdParty/Breakpad/src/common/module.h | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/3rdParty/Breakpad/src/common/module.h b/3rdParty/Breakpad/src/common/module.h index cc89bba..6c2bb27 100644 --- a/3rdParty/Breakpad/src/common/module.h +++ b/3rdParty/Breakpad/src/common/module.h @@ -46,2 +46,3 @@ +#include "common/symbol_data.h" #include "common/using_std_string.h" @@ -62,3 +63,3 @@ class Module { // The type of addresses and sizes in a symbol table. - typedef u_int64_t Address; + typedef uint64_t Address; struct File; @@ -75,4 +76,6 @@ class Module { struct File { + explicit File(const string &name_input) : name(name_input), source_id(0) {} + // The name of the source file. - string name; + const string name; @@ -86,2 +89,5 @@ class Module { struct Function { + Function(const string &name_input, const Address &address_input) : + name(name_input), address(address_input), size(0), parameter_size(0) {} + // For sorting by address. (Not style-guide compliant, but it's @@ -93,6 +99,7 @@ class Module { // The function's name. - string name; + const string name; // The start address and length of the function's code. - Address address, size; + const Address address; + Address size; @@ -121,3 +128,4 @@ class Module { struct Extern { - Address address; + explicit Extern(const Address &address_input) : address(address_input) {} + const Address address; string name; @@ -173,3 +181,3 @@ class Module { Module(const string &name, const string &os, const string &architecture, - const string &id); + const string &id, const string &code_id = ""); ~Module(); @@ -248,3 +256,3 @@ class Module { // a more appropriate interface.) - void GetStackFrameEntries(vector<StackFrameEntry *> *vec); + void GetStackFrameEntries(vector<StackFrameEntry *> *vec) const; @@ -261,2 +269,3 @@ class Module { // - a header based on the values given to the constructor, + // If symbol_data is not ONLY_CFI then: // - the source files added via FindFile, @@ -264,6 +273,13 @@ class Module { // - all public records, - // - and if CFI is true, all CFI records. + // If symbol_data is not NO_CFI then: + // - all CFI records. // Addresses in the output are all relative to the load address // established by SetLoadAddress. - bool Write(std::ostream &stream, bool cfi); + bool Write(std::ostream &stream, SymbolData symbol_data); + + string name() const { return name_; } + string os() const { return os_; } + string architecture() const { return architecture_; } + string identifier() const { return id_; } + string code_identifier() const { return code_id_; } @@ -280,3 +296,3 @@ class Module { // Module header entries. - string name_, os_, architecture_, id_; + string name_, os_, architecture_, id_, code_id_; @@ -290,3 +306,3 @@ class Module { struct CompareStringPtrs { - bool operator()(const string *x, const string *y) { return *x < *y; } + bool operator()(const string *x, const string *y) const { return *x < *y; } }; |