1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef _LIBUNWINDSTACK_DWARF_STRUCTS_H 18 #define _LIBUNWINDSTACK_DWARF_STRUCTS_H 19 20 #include <stdint.h> 21 22 #include <vector> 23 24 namespace unwindstack { 25 26 struct DwarfCie { 27 uint8_t version = 0; 28 uint8_t fde_address_encoding = 0; 29 uint8_t lsda_encoding = 0; 30 uint8_t segment_size = 0; 31 std::vector<char> augmentation_string; 32 uint64_t personality_handler = 0; 33 uint64_t cfa_instructions_offset = 0; 34 uint64_t cfa_instructions_end = 0; 35 uint64_t code_alignment_factor = 0; 36 int64_t data_alignment_factor = 0; 37 uint64_t return_address_register = 0; 38 bool is_signal_frame = false; 39 }; 40 41 struct DwarfFde { 42 uint64_t cie_offset = 0; 43 uint64_t cfa_instructions_offset = 0; 44 uint64_t cfa_instructions_end = 0; 45 uint64_t pc_start = 0; 46 uint64_t pc_end = 0; 47 uint64_t lsda_address = 0; 48 const DwarfCie* cie = nullptr; 49 }; 50 51 constexpr uint16_t CFA_REG = static_cast<uint16_t>(-1); 52 53 } // namespace unwindstack 54 55 #endif // _LIBUNWINDSTACK_DWARF_STRUCTS_H 56