diff options
author | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2011-03-04 16:08:39 +0000 |
---|---|---|
committer | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2011-03-04 16:08:39 +0000 |
commit | bf25801d837b8fc496bf9c3a34eac525d8a3d8ae (patch) | |
tree | eefc9e418e10864c47cf9055ddf97a79f8a38979 /src/common/stabs_to_module.h | |
parent | Updating to ints from unsigned ints so -1 will be an acceptable value. (diff) | |
download | breakpad-bf25801d837b8fc496bf9c3a34eac525d8a3d8ae.tar.xz |
Put PUBLIC lines in Mac symbol files.
Exported symbols on Mach-O binaries are defined in a STABS section. This patch makes stabs_reader handle them, adds support for Extern symbols in the Module class (which are output as PUBLIC lines in symbol files), and the proper processing in stabs_to_module to hook it all up.
A=mark R=jimb at http://breakpad.appspot.com/163001 and http://breakpad.appspot.com/267001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@778 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/stabs_to_module.h')
-rw-r--r-- | src/common/stabs_to_module.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/common/stabs_to_module.h b/src/common/stabs_to_module.h index 6538d78d..632f4d00 100644 --- a/src/common/stabs_to_module.h +++ b/src/common/stabs_to_module.h @@ -35,8 +35,8 @@ // STABS debugging information from a parser and adds it to a Breakpad // symbol file. -#ifndef COMMON_LINUX_DUMP_STABS_H__ -#define COMMON_LINUX_DUMP_STABS_H__ +#ifndef BREAKPAD_COMMON_STABS_TO_MODULE_H_ +#define BREAKPAD_COMMON_STABS_TO_MODULE_H_ #include <stdint.h> @@ -51,12 +51,14 @@ namespace google_breakpad { using std::string; using std::vector; -// A StabsToModule is a handler that receives parsed STABS -// debugging information from a StabsReader, and uses that to populate +// A StabsToModule is a handler that receives parsed STABS debugging +// information from a StabsReader, and uses that to populate // a Module. (All classes are in the google_breakpad namespace.) A // Module represents the contents of a Breakpad symbol file, and knows // how to write itself out as such. A StabsToModule thus acts as // the bridge between STABS and Breakpad data. +// When processing Darwin Mach-O files, this also receives public linker +// symbols, like those found in system libraries. class StabsToModule: public google_breakpad::StabsHandler { public: // Receive parsed debugging information from a StabsReader, and @@ -77,6 +79,7 @@ class StabsToModule: public google_breakpad::StabsHandler { bool StartFunction(const string &name, uint64_t address); bool EndFunction(uint64_t address); bool Line(uint64_t address, const char *name, int number); + bool Extern(const string &name, uint64_t address); void Warning(const char *format, ...); // Do any final processing necessary to make module_ contain all the @@ -135,6 +138,6 @@ class StabsToModule: public google_breakpad::StabsHandler { const char *current_source_file_name_; }; -} // namespace google_breakpad +} // namespace google_breakpad -#endif // COMMON_LINUX_DUMP_STABS_H__ +#endif // BREAKPAD_COMMON_STABS_TO_MODULE_H_ |