aboutsummaryrefslogtreecommitdiff
path: root/src/common/dwarf_cfi_to_module.h
diff options
context:
space:
mode:
authorjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-04-28 18:14:59 +0000
committerjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-04-28 18:14:59 +0000
commit504280af60e3052d2ecaa9e003818886e651310f (patch)
tree89cbeedd14326076ef0f2e2d3d4e0a3bd0264e2b /src/common/dwarf_cfi_to_module.h
parentBreakpad test support: Move test_assembler.{h,cc} from src/processor to src/c... (diff)
downloadbreakpad-504280af60e3052d2ecaa9e003818886e651310f.tar.xz
Breakpad Dumper: Move CFI register names to DwarfCFIToModule class.
At the moment, the mappings from register numbers appearing in DWARF CFI and .eh_frame exception handling sections to the appropriate processor-specific names are in src/common/linux/dump_syms.cc. However, the numberings are (for the most part) the same on all platforms using DWARF, so there's no reason those tables shouldn't be shared between the Linux and Mac symbol dumpers. This patch moves the tables into a nested class of DwarfCFIToModule, so they the Mac dumper can use them when it is changed to use DwarfCFIToModule. a=jimblandy, r=thestig git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@575 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/dwarf_cfi_to_module.h')
-rw-r--r--src/common/dwarf_cfi_to_module.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/common/dwarf_cfi_to_module.h b/src/common/dwarf_cfi_to_module.h
index 002fc90f..4f4ce0a2 100644
--- a/src/common/dwarf_cfi_to_module.h
+++ b/src/common/dwarf_cfi_to_module.h
@@ -91,6 +91,26 @@ class DwarfCFIToModule: public CallFrameInfo::Handler {
string file_, section_;
};
+ // Register name tables. If TABLE is a vector returned by one of these
+ // functions, then TABLE[R] is the name of the register numbered R in
+ // DWARF call frame information.
+ class RegisterNames {
+ public:
+ // Intel's "x86" or IA-32.
+ static vector<string> I386();
+
+ // AMD x86_64, AMD64, Intel EM64T, or Intel 64
+ static vector<string> X86_64();
+
+ // ARM.
+ static vector<string> ARM();
+
+ private:
+ // Given STRINGS, an array of C strings with SIZE elements, return an
+ // equivalent vector<string>.
+ static vector<string> MakeVector(const char * const *strings, size_t size);
+ };
+
// Create a handler for the dwarf2reader::CallFrameInfo parser that
// records the stack unwinding information it receives in MODULE.
//