tools/profiler/LulDwarfInt.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
     4 // Copyright (c) 2008, 2010 Google Inc. All Rights Reserved.
     5 //
     6 // Redistribution and use in source and binary forms, with or without
     7 // modification, are permitted provided that the following conditions are
     8 // met:
     9 //
    10 //     * Redistributions of source code must retain the above copyright
    11 // notice, this list of conditions and the following disclaimer.
    12 //     * Redistributions in binary form must reproduce the above
    13 // copyright notice, this list of conditions and the following disclaimer
    14 // in the documentation and/or other materials provided with the
    15 // distribution.
    16 //     * Neither the name of Google Inc. nor the names of its
    17 // contributors may be used to endorse or promote products derived from
    18 // this software without specific prior written permission.
    19 //
    20 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    21 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    22 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    23 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    24 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    25 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    26 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    27 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    28 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    29 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    30 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    32 // CFI reader author: Jim Blandy <jimb@mozilla.com> <jimb@red-bean.com>
    34 // This file is derived from the following file in
    35 // toolkit/crashreporter/google-breakpad:
    36 //   src/common/dwarf/dwarf2enums.h
    38 #ifndef LulDwarfInt_h
    39 #define LulDwarfInt_h
    41 #include "LulCommonExt.h"
    42 #include "LulDwarfExt.h"
    44 namespace lul {
    46 // These enums do not follow the google3 style only because they are
    47 // known universally (specs, other implementations) by the names in
    48 // exactly this capitalization.
    49 // Tag names and codes.
    51 // Call Frame Info instructions.
    52 enum DwarfCFI
    53   {
    54     DW_CFA_advance_loc        = 0x40,
    55     DW_CFA_offset             = 0x80,
    56     DW_CFA_restore            = 0xc0,
    57     DW_CFA_nop                = 0x00,
    58     DW_CFA_set_loc            = 0x01,
    59     DW_CFA_advance_loc1       = 0x02,
    60     DW_CFA_advance_loc2       = 0x03,
    61     DW_CFA_advance_loc4       = 0x04,
    62     DW_CFA_offset_extended    = 0x05,
    63     DW_CFA_restore_extended   = 0x06,
    64     DW_CFA_undefined          = 0x07,
    65     DW_CFA_same_value         = 0x08,
    66     DW_CFA_register           = 0x09,
    67     DW_CFA_remember_state     = 0x0a,
    68     DW_CFA_restore_state      = 0x0b,
    69     DW_CFA_def_cfa            = 0x0c,
    70     DW_CFA_def_cfa_register   = 0x0d,
    71     DW_CFA_def_cfa_offset     = 0x0e,
    72     DW_CFA_def_cfa_expression = 0x0f,
    73     DW_CFA_expression         = 0x10,
    74     DW_CFA_offset_extended_sf = 0x11,
    75     DW_CFA_def_cfa_sf         = 0x12,
    76     DW_CFA_def_cfa_offset_sf  = 0x13,
    77     DW_CFA_val_offset         = 0x14,
    78     DW_CFA_val_offset_sf      = 0x15,
    79     DW_CFA_val_expression     = 0x16,
    81     // Opcodes in this range are reserved for user extensions.
    82     DW_CFA_lo_user = 0x1c,
    83     DW_CFA_hi_user = 0x3f,
    85     // SGI/MIPS specific.
    86     DW_CFA_MIPS_advance_loc8 = 0x1d,
    88     // GNU extensions.
    89     DW_CFA_GNU_window_save = 0x2d,
    90     DW_CFA_GNU_args_size = 0x2e,
    91     DW_CFA_GNU_negative_offset_extended = 0x2f
    92   };
    94 // Exception handling 'z' augmentation letters.
    95 enum DwarfZAugmentationCodes {
    96   // If the CFI augmentation string begins with 'z', then the CIE and FDE
    97   // have an augmentation data area just before the instructions, whose
    98   // contents are determined by the subsequent augmentation letters.
    99   DW_Z_augmentation_start = 'z',
   101   // If this letter is present in a 'z' augmentation string, the CIE
   102   // augmentation data includes a pointer encoding, and the FDE
   103   // augmentation data includes a language-specific data area pointer,
   104   // represented using that encoding.
   105   DW_Z_has_LSDA = 'L',
   107   // If this letter is present in a 'z' augmentation string, the CIE
   108   // augmentation data includes a pointer encoding, followed by a pointer
   109   // to a personality routine, represented using that encoding.
   110   DW_Z_has_personality_routine = 'P',
   112   // If this letter is present in a 'z' augmentation string, the CIE
   113   // augmentation data includes a pointer encoding describing how the FDE's
   114   // initial location, address range, and DW_CFA_set_loc operands are
   115   // encoded.
   116   DW_Z_has_FDE_address_encoding = 'R',
   118   // If this letter is present in a 'z' augmentation string, then code
   119   // addresses covered by FDEs that cite this CIE are signal delivery
   120   // trampolines. Return addresses of frames in trampolines should not be
   121   // adjusted as described in section 6.4.4 of the DWARF 3 spec.
   122   DW_Z_is_signal_trampoline = 'S'
   123 };
   125 } // namespace lul
   127 #endif // LulDwarfInt_h

mercurial