aboutsummaryrefslogtreecommitdiff
path: root/src/common/dwarf_cu_to_module.h
diff options
context:
space:
mode:
authorted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-01-23 18:01:28 +0000
committerted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-01-23 18:01:28 +0000
commit1f87c4a732fa5175218549b4d7053112dbd57894 (patch)
tree9e2ff52635b97120c72dbc82f8f2e7e53f5c4d67 /src/common/dwarf_cu_to_module.h
parentPrint the correct return address, even on architectures where StackFrame::ins... (diff)
downloadbreakpad-1f87c4a732fa5175218549b4d7053112dbd57894.tar.xz
Include the compilation directory for FILE entries, making them absolute instead of relative
A=Ryan Sleevi <rsleevi@chromium.org> R=mark,ted at https://breakpad.appspot.com/385001/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1106 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/dwarf_cu_to_module.h')
-rw-r--r--src/common/dwarf_cu_to_module.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/common/dwarf_cu_to_module.h b/src/common/dwarf_cu_to_module.h
index c7072b0f..85453316 100644
--- a/src/common/dwarf_cu_to_module.h
+++ b/src/common/dwarf_cu_to_module.h
@@ -92,21 +92,27 @@ class DwarfCUToModule: public dwarf2reader::RootDIEHandler {
FilePrivate *file_private;
};
- // An abstract base class for functors that handle DWARF line data
+ // An abstract base class for handlers that handle DWARF line data
// for DwarfCUToModule. DwarfCUToModule could certainly just use
// dwarf2reader::LineInfo itself directly, but decoupling things
// this way makes unit testing a little easier.
- class LineToModuleFunctor {
+ class LineToModuleHandler {
public:
- LineToModuleFunctor() { }
- virtual ~LineToModuleFunctor() { }
+ LineToModuleHandler() { }
+ virtual ~LineToModuleHandler() { }
+
+ // Called at the beginning of a new compilation unit, prior to calling
+ // ReadProgram(). compilation_dir will indicate the path that the
+ // current compilation unit was compiled in, consistent with the
+ // DW_AT_comp_dir DIE.
+ virtual void StartCompilationUnit(const string& compilation_dir) = 0;
// Populate MODULE and LINES with source file names and code/line
// mappings, given a pointer to some DWARF line number data
// PROGRAM, and an overestimate of its size. Add no zero-length
// lines to LINES.
- virtual void operator()(const char *program, uint64 length,
- Module *module, vector<Module::Line> *lines) = 0;
+ virtual void ReadProgram(const char *program, uint64 length,
+ Module *module, vector<Module::Line> *lines) = 0;
};
// The interface DwarfCUToModule uses to report warnings. The member
@@ -186,7 +192,7 @@ class DwarfCUToModule: public dwarf2reader::RootDIEHandler {
// unit's line number data. Use REPORTER to report problems with the
// data we find.
DwarfCUToModule(FileContext *file_context,
- LineToModuleFunctor *line_reader,
+ LineToModuleHandler *line_reader,
WarningReporter *reporter);
~DwarfCUToModule();
@@ -247,8 +253,8 @@ class DwarfCUToModule: public dwarf2reader::RootDIEHandler {
// owned by this DwarfCUToModule: the constructor sets them, and the
// destructor deletes them.
- // The functor to use to handle line number data.
- LineToModuleFunctor *line_reader_;
+ // The handler to use to handle line number data.
+ LineToModuleHandler *line_reader_;
// This compilation unit's context.
CUContext *cu_context_;