diff options
author | jimblandy@gmail.com <jimblandy@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2009-12-15 16:32:32 +0000 |
---|---|---|
committer | jimblandy@gmail.com <jimblandy@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2009-12-15 16:32:32 +0000 |
commit | bb846bdc98c4c0249bfa9c627f4004aa54b7c900 (patch) | |
tree | 9cbe5d4e7a407a4105aa09b83ccdbf7a32da78f8 | |
parent | Issue 39001: Breakpad Linux dumper: Refactor Makefile. (diff) | |
download | breakpad-bb846bdc98c4c0249bfa9c627f4004aa54b7c900.tar.xz |
Issue 25002: Linux symbol dumper: Require STABS consumers to provide a Warning member.
The StabsHandler class should not provide a fallback definition for
its Warning member function that just throws away warning messages.
It should require the consumer to provide an appropriate definition.
a=jimblandy, r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@442 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r-- | src/common/linux/dump_symbols.cc | 8 | ||||
-rw-r--r-- | src/common/linux/stabs_reader.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc index a7888189..5d4e8834 100644 --- a/src/common/linux/dump_symbols.cc +++ b/src/common/linux/dump_symbols.cc @@ -144,6 +144,7 @@ class DumpStabsHandler: public google_breakpad::StabsHandler { bool StartFunction(const std::string &name, uint64_t address); bool EndFunction(uint64_t address); bool Line(uint64_t address, const char *name, int number); + void Warning(const char *format, ...); // Do any final processing necessary to make module_ contain all the // data provided by the STABS reader. @@ -265,6 +266,13 @@ bool DumpStabsHandler::Line(uint64_t address, const char *name, int number) { return true; } +void DumpStabsHandler::Warning(const char *format, ...) { + va_list args; + va_start(args, format); + vfprintf(stderr, format, args); + va_end(args); +} + void DumpStabsHandler::Finalize() { // Sort our boundary list, so we can search it quickly. sort(boundaries_.begin(), boundaries_.end()); diff --git a/src/common/linux/stabs_reader.h b/src/common/linux/stabs_reader.h index 7ebc30b1..1f284b02 100644 --- a/src/common/linux/stabs_reader.h +++ b/src/common/linux/stabs_reader.h @@ -180,7 +180,7 @@ class StabsHandler { // Report a warning. FORMAT is a printf-like format string, // specifying how to format the subsequent arguments. - virtual void Warning(const char *format, ...) { } + virtual void Warning(const char *format, ...) = 0; }; } // namespace google_breakpad |