aboutsummaryrefslogtreecommitdiff
path: root/src/google_breakpad/processor/source_line_resolver_base.h
diff options
context:
space:
mode:
authorSiyangXie@gmail.com <SiyangXie@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-11-01 17:31:31 +0000
committerSiyangXie@gmail.com <SiyangXie@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-11-01 17:31:31 +0000
commita8c1c466a16ad4c85bfd1ca20ab8fc056d669abe (patch)
treea2125b96e08b34b828364885d9cd52845a1eff93 /src/google_breakpad/processor/source_line_resolver_base.h
parentAdd missing module_serializer.h and module_serializer.cc for class ModuleSeri... (diff)
downloadbreakpad-a8c1c466a16ad4c85bfd1ca20ab8fc056d669abe.tar.xz
Restrict ownership of symbol data buffers to symbol supplier.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@721 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/google_breakpad/processor/source_line_resolver_base.h')
-rw-r--r--src/google_breakpad/processor/source_line_resolver_base.h30
1 files changed, 6 insertions, 24 deletions
diff --git a/src/google_breakpad/processor/source_line_resolver_base.h b/src/google_breakpad/processor/source_line_resolver_base.h
index 8113e2ed..d950a736 100644
--- a/src/google_breakpad/processor/source_line_resolver_base.h
+++ b/src/google_breakpad/processor/source_line_resolver_base.h
@@ -73,35 +73,13 @@ class SourceLineResolverBase : public SourceLineResolverInterface {
const string &map_buffer);
virtual bool LoadModuleUsingMemoryBuffer(const CodeModule *module,
char *memory_buffer);
+ virtual bool ShouldDeleteMemoryBufferAfterLoadModule();
virtual void UnloadModule(const CodeModule *module);
virtual bool HasModule(const CodeModule *module);
virtual void FillSourceLineInfo(StackFrame *frame);
virtual WindowsFrameInfo *FindWindowsFrameInfo(const StackFrame *frame);
virtual CFIFrameInfo *FindCFIFrameInfo(const StackFrame *frame);
- // Helper methods to manage C-String format symbol data.
- // These methods are defined as no-op by default.
- //
- // StoreDataBeforeLoad() will be called in LoadModule() and
- // LoadModuleUsingMapBuffer() to let subclass decide whether or how to store
- // the dynamicly allocated memory data, before passing the data to
- // LoadModuleUsingMemoryBuffer() which actually loads the module.
- virtual void StoreDataBeforeLoad(const CodeModule *module, char *symbol_data);
-
- // DeleteDataAfterLoad() will be called at the end of
- // LoadModuleUsingMemoryBuffer() to let subclass decide whether to delete the
- // allocated memory data or not (which depends on whether the subclass has
- // ownership of the data or not).
- virtual void DeleteDataAfterLoad(char *symbol_data);
-
- // DeleteDataUnload() will be called in UnloadModule() to let subclass clean
- // up dynamicly allocated data associated with the module, if there is any.
- virtual void DeleteDataUnload(const CodeModule *module);
-
- // ClearLocalMemory() will be called in destructor to let subclass clean up
- // all local memory data it owns, if there is any.
- virtual void ClearLocalMemory();
-
// Nested structs and classes.
struct Line;
struct Function;
@@ -113,10 +91,14 @@ class SourceLineResolverBase : public SourceLineResolverInterface {
class Module;
class AutoFileCloser;
- // All of the modules we've loaded
+ // All of the modules that are loaded.
typedef map<string, Module*, CompareString> ModuleMap;
ModuleMap *modules_;
+ // All of heap-allocated buffers that are owned locally by resolver.
+ typedef std::map<string, char*, CompareString> MemoryMap;
+ MemoryMap *memory_buffers_;
+
// Creates a concrete module at run-time.
ModuleFactory *module_factory_;