tools/profiler/LulDwarfInt.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

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

mercurial