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
This commit is contained in:
jimblandy@gmail.com 2009-12-15 16:32:32 +00:00
parent 1c9c0568e0
commit bb846bdc98
2 changed files with 9 additions and 1 deletions

View file

@ -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());

View file

@ -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