michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set ts=8 sts=2 et sw=2 tw=80: */ michael@0: michael@0: // Copyright (c) 2008, 2010 Google Inc. All Rights Reserved. michael@0: // michael@0: // Redistribution and use in source and binary forms, with or without michael@0: // modification, are permitted provided that the following conditions are michael@0: // met: michael@0: // michael@0: // * Redistributions of source code must retain the above copyright michael@0: // notice, this list of conditions and the following disclaimer. michael@0: // * Redistributions in binary form must reproduce the above michael@0: // copyright notice, this list of conditions and the following disclaimer michael@0: // in the documentation and/or other materials provided with the michael@0: // distribution. michael@0: // * Neither the name of Google Inc. nor the names of its michael@0: // contributors may be used to endorse or promote products derived from michael@0: // this software without specific prior written permission. michael@0: // michael@0: // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS michael@0: // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT michael@0: // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR michael@0: // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT michael@0: // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@0: // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@0: // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, michael@0: // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY michael@0: // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT michael@0: // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE michael@0: // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. michael@0: michael@0: // CFI reader author: Jim Blandy michael@0: michael@0: // This file is derived from the following file in michael@0: // toolkit/crashreporter/google-breakpad: michael@0: // src/common/dwarf/dwarf2enums.h michael@0: michael@0: #ifndef LulDwarfInt_h michael@0: #define LulDwarfInt_h michael@0: michael@0: #include "LulCommonExt.h" michael@0: #include "LulDwarfExt.h" michael@0: michael@0: namespace lul { michael@0: michael@0: // These enums do not follow the google3 style only because they are michael@0: // known universally (specs, other implementations) by the names in michael@0: // exactly this capitalization. michael@0: // Tag names and codes. michael@0: michael@0: // Call Frame Info instructions. michael@0: enum DwarfCFI michael@0: { michael@0: DW_CFA_advance_loc = 0x40, michael@0: DW_CFA_offset = 0x80, michael@0: DW_CFA_restore = 0xc0, michael@0: DW_CFA_nop = 0x00, michael@0: DW_CFA_set_loc = 0x01, michael@0: DW_CFA_advance_loc1 = 0x02, michael@0: DW_CFA_advance_loc2 = 0x03, michael@0: DW_CFA_advance_loc4 = 0x04, michael@0: DW_CFA_offset_extended = 0x05, michael@0: DW_CFA_restore_extended = 0x06, michael@0: DW_CFA_undefined = 0x07, michael@0: DW_CFA_same_value = 0x08, michael@0: DW_CFA_register = 0x09, michael@0: DW_CFA_remember_state = 0x0a, michael@0: DW_CFA_restore_state = 0x0b, michael@0: DW_CFA_def_cfa = 0x0c, michael@0: DW_CFA_def_cfa_register = 0x0d, michael@0: DW_CFA_def_cfa_offset = 0x0e, michael@0: DW_CFA_def_cfa_expression = 0x0f, michael@0: DW_CFA_expression = 0x10, michael@0: DW_CFA_offset_extended_sf = 0x11, michael@0: DW_CFA_def_cfa_sf = 0x12, michael@0: DW_CFA_def_cfa_offset_sf = 0x13, michael@0: DW_CFA_val_offset = 0x14, michael@0: DW_CFA_val_offset_sf = 0x15, michael@0: DW_CFA_val_expression = 0x16, michael@0: michael@0: // Opcodes in this range are reserved for user extensions. michael@0: DW_CFA_lo_user = 0x1c, michael@0: DW_CFA_hi_user = 0x3f, michael@0: michael@0: // SGI/MIPS specific. michael@0: DW_CFA_MIPS_advance_loc8 = 0x1d, michael@0: michael@0: // GNU extensions. michael@0: DW_CFA_GNU_window_save = 0x2d, michael@0: DW_CFA_GNU_args_size = 0x2e, michael@0: DW_CFA_GNU_negative_offset_extended = 0x2f michael@0: }; michael@0: michael@0: // Exception handling 'z' augmentation letters. michael@0: enum DwarfZAugmentationCodes { michael@0: // If the CFI augmentation string begins with 'z', then the CIE and FDE michael@0: // have an augmentation data area just before the instructions, whose michael@0: // contents are determined by the subsequent augmentation letters. michael@0: DW_Z_augmentation_start = 'z', michael@0: michael@0: // If this letter is present in a 'z' augmentation string, the CIE michael@0: // augmentation data includes a pointer encoding, and the FDE michael@0: // augmentation data includes a language-specific data area pointer, michael@0: // represented using that encoding. michael@0: DW_Z_has_LSDA = 'L', michael@0: michael@0: // If this letter is present in a 'z' augmentation string, the CIE michael@0: // augmentation data includes a pointer encoding, followed by a pointer michael@0: // to a personality routine, represented using that encoding. michael@0: DW_Z_has_personality_routine = 'P', michael@0: michael@0: // If this letter is present in a 'z' augmentation string, the CIE michael@0: // augmentation data includes a pointer encoding describing how the FDE's michael@0: // initial location, address range, and DW_CFA_set_loc operands are michael@0: // encoded. michael@0: DW_Z_has_FDE_address_encoding = 'R', michael@0: michael@0: // If this letter is present in a 'z' augmentation string, then code michael@0: // addresses covered by FDEs that cite this CIE are signal delivery michael@0: // trampolines. Return addresses of frames in trampolines should not be michael@0: // adjusted as described in section 6.4.4 of the DWARF 3 spec. michael@0: DW_Z_is_signal_trampoline = 'S' michael@0: }; michael@0: michael@0: } // namespace lul michael@0: michael@0: #endif // LulDwarfInt_h