aboutsummaryrefslogtreecommitdiff
path: root/src/tools/mac/crash_report/on_demand_symbol_supplier.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/mac/crash_report/on_demand_symbol_supplier.h')
-rw-r--r--src/tools/mac/crash_report/on_demand_symbol_supplier.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tools/mac/crash_report/on_demand_symbol_supplier.h b/src/tools/mac/crash_report/on_demand_symbol_supplier.h
index 2bad776d..28002c6b 100644
--- a/src/tools/mac/crash_report/on_demand_symbol_supplier.h
+++ b/src/tools/mac/crash_report/on_demand_symbol_supplier.h
@@ -61,10 +61,16 @@ class OnDemandSymbolSupplier : public SymbolSupplier {
const SystemInfo *system_info,
string *symbol_file,
string *symbol_data);
+ // Allocates data buffer on heap, and takes the ownership of
+ // the data buffer.
virtual SymbolResult GetCStringSymbolData(const CodeModule *module,
const SystemInfo *system_info,
string *symbol_file,
char **symbol_data);
+
+ // Delete the data buffer allocated for module in GetCStringSymbolData().
+ virtual void FreeSymbolData(const CodeModule *module);
+
protected:
// Search directory
string search_dir_;
@@ -74,6 +80,9 @@ class OnDemandSymbolSupplier : public SymbolSupplier {
// and the path to that module's symbol file.
map<string, string> module_file_map_;
+ // Map of allocated data buffers, keyed by module->code_file().
+ map<string, char *> memory_buffers_;
+
// Return the name for |module| This will be the value used as the key
// to the |module_file_map_|.
string GetNameForModule(const CodeModule *module);