From 504280af60e3052d2ecaa9e003818886e651310f Mon Sep 17 00:00:00 2001 From: jimblandy Date: Wed, 28 Apr 2010 18:14:59 +0000 Subject: 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 --- src/common/dwarf_cfi_to_module.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/common/dwarf_cfi_to_module.h') 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 I386(); + + // AMD x86_64, AMD64, Intel EM64T, or Intel 64 + static vector X86_64(); + + // ARM. + static vector ARM(); + + private: + // Given STRINGS, an array of C strings with SIZE elements, return an + // equivalent vector. + static vector 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. // -- cgit v1.2.1