From bb846bdc98c4c0249bfa9c627f4004aa54b7c900 Mon Sep 17 00:00:00 2001 From: "jimblandy@gmail.com" Date: Tue, 15 Dec 2009 16:32:32 +0000 Subject: 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 --- src/common/linux/dump_symbols.cc | 8 ++++++++ src/common/linux/stabs_reader.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/common/linux') 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 -- cgit v1.2.1