mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-02-19 00:39:38 +00:00
Modify symbol supplier interface to support an overload that takes a symbol data buffer, to get around an extraneous read/write of symbol data
R=doshimun git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@311 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
@@ -69,6 +69,12 @@ class BasicSourceLineResolver : public SourceLineResolverInterface {
|
||||
// retained until the BasicSourceLineResolver is destroyed.
|
||||
virtual bool LoadModule(const string &module_name, const string &map_file);
|
||||
|
||||
// Exactly the same as above, except the given map_buffer is used
|
||||
// for symbols.
|
||||
virtual bool LoadModuleUsingMapBuffer(const string &module_name,
|
||||
const string &map_buffer);
|
||||
|
||||
|
||||
virtual bool HasModule(const string &module_name) const;
|
||||
|
||||
virtual StackFrameInfo* FillSourceLineInfo(StackFrame *frame) const;
|
||||
|
||||
@@ -56,6 +56,9 @@ class SourceLineResolverInterface {
|
||||
// map_file should contain line/address mappings for this module.
|
||||
virtual bool LoadModule(const string &module_name,
|
||||
const string &map_file) = 0;
|
||||
// Same as above, but takes the contents of a pre-read map buffer
|
||||
virtual bool LoadModuleUsingMapBuffer(const string &module_name,
|
||||
const string &map_buffer) = 0;
|
||||
|
||||
// Returns true if a module with the given name has been loaded.
|
||||
virtual bool HasModule(const string &module_name) const = 0;
|
||||
|
||||
@@ -59,12 +59,22 @@ class SymbolSupplier {
|
||||
|
||||
// Retrieves the symbol file for the given CodeModule, placing the
|
||||
// path in symbol_file if successful. system_info contains strings
|
||||
// identifying the operating system and CPU; SymbolSupplier may use to help
|
||||
// locate the symbol file. system_info may be NULL or its fields may be
|
||||
// empty if these values are unknown.
|
||||
// identifying the operating system and CPU; SymbolSupplier may use
|
||||
// to help locate the symbol file. system_info may be NULL or its
|
||||
// fields may be empty if these values are unknown. symbol_file
|
||||
// must be a pointer to a valid string
|
||||
virtual SymbolResult GetSymbolFile(const CodeModule *module,
|
||||
const SystemInfo *system_info,
|
||||
string *symbol_file) = 0;
|
||||
// Same as above, except also places symbol data into symbol_data.
|
||||
// If symbol_data is NULL, the data is not returned.
|
||||
// TODO(nealsid) Once we have symbol data caching behavior implemented
|
||||
// investigate making all symbol suppliers implement all methods,
|
||||
// and make this pure virtual
|
||||
virtual SymbolResult GetSymbolFile(const CodeModule *module,
|
||||
const SystemInfo *system_info,
|
||||
string *symbol_file,
|
||||
string *symbol_data) { assert(0); }
|
||||
};
|
||||
|
||||
} // namespace google_breakpad
|
||||
|
||||
Reference in New Issue
Block a user