aboutsummaryrefslogtreecommitdiff
path: root/src/processor/simple_symbol_supplier.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/processor/simple_symbol_supplier.h')
-rw-r--r--src/processor/simple_symbol_supplier.h37
1 files changed, 22 insertions, 15 deletions
diff --git a/src/processor/simple_symbol_supplier.h b/src/processor/simple_symbol_supplier.h
index 6359da2a..e4083761 100644
--- a/src/processor/simple_symbol_supplier.h
+++ b/src/processor/simple_symbol_supplier.h
@@ -31,14 +31,14 @@
//
// SimpleSymbolSupplier is a straightforward implementation of SymbolSupplier
// that stores symbol files in a filesystem tree. A SimpleSymbolSupplier is
-// created with a base directory, which is the root for all symbol files.
-// Each symbol file contained therien has a directory entry in the base
-// directory with a name identical to the corresponding debugging file (pdb).
-// Within each of these directories, there are subdirectories named for the
-// debugging file's identifier. For recent pdb files, this is a concatenation
-// of the pdb's uuid and age, presented in hexadecimal form, without any
-// dashes or separators. The uuid is in uppercase hexadecimal and the age
-// is in lowercase hexadecimal. Within that subdirectory,
+// created with one or more base directories, which are the root paths for all
+// symbol files. Each symbol file contained therein has a directory entry in
+// the base directory with a name identical to the corresponding debugging
+// file (pdb). Within each of these directories, there are subdirectories
+// named for the debugging file's identifier. For recent pdb files, this is
+// a concatenation of the pdb's uuid and age, presented in hexadecimal form,
+// without any dashes or separators. The uuid is in uppercase hexadecimal
+// and the age is in lowercase hexadecimal. Within that subdirectory,
// SimpleSymbolSupplier expects to find the symbol file, which is named
// identically to the debug file, but with a .sym extension. If the original
// debug file had a name ending in .pdb, the .pdb extension will be replaced
@@ -62,6 +62,9 @@
// SimpleSymbolServer, provided that the pdb files are transformed to dumped
// format using a tool such as dump_syms, and given a .sym extension.
//
+// SimpleSymbolSupplier will iterate over all root paths searching for
+// a symbol file existing in that path.
+//
// SimpleSymbolSupplier supports any debugging file which can be identified
// by a CodeModule object's debug_file and debug_identifier accessors. The
// expected ultimate source of these CodeModule objects are MinidumpModule
@@ -74,12 +77,14 @@
#define PROCESSOR_SIMPLE_SYMBOL_SUPPLIER_H__
#include <string>
+#include <vector>
#include "google_airbag/processor/symbol_supplier.h"
namespace google_airbag {
using std::string;
+using std::vector;
class CodeModule;
@@ -87,17 +92,19 @@ class SimpleSymbolSupplier : public SymbolSupplier {
public:
// Creates a new SimpleSymbolSupplier, using path as the root path where
// symbols are stored.
- explicit SimpleSymbolSupplier(const string &path) : path_(path) {}
+ explicit SimpleSymbolSupplier(const string &path) : paths_(1, path) {}
+
+ // Creates a new SimpleSymbolSupplier, using paths as a list of root
+ // paths where symbols may be stored.
+ explicit SimpleSymbolSupplier(const vector<string> &paths) : paths_(paths) {}
virtual ~SimpleSymbolSupplier() {}
// Returns the path to the symbol file for the given module. See the
// description above.
- virtual SymbolResult GetSymbolFile(const CodeModule *module,
- const SystemInfo *system_info,
- string *symbol_file) {
- return GetSymbolFileAtPath(module, system_info, path_, symbol_file);
- }
+ SymbolResult GetSymbolFile(const CodeModule *module,
+ const SystemInfo *system_info,
+ string *symbol_file);
protected:
SymbolResult GetSymbolFileAtPath(const CodeModule *module,
@@ -106,7 +113,7 @@ class SimpleSymbolSupplier : public SymbolSupplier {
string *symbol_file);
private:
- string path_;
+ vector<string> paths_;
};
} // namespace google_airbag