blob: 4b481f08255006e5ecd7312f4efe8127759a295b [file] [log] [blame]
Christopher Ferris8642fcb2017-04-24 11:14:39 -07001/*
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
Christopher Ferrisd226a512017-07-14 10:37:19 -070024namespace unwindstack {
Christopher Ferris8642fcb2017-04-24 11:14:39 -070025
Christopher Ferris53a3c9b2017-05-10 18:34:15 -070026struct DwarfCie {
Christopher Ferris8642fcb2017-04-24 11:14:39 -070027 uint8_t version = 0;
Christopher Ferrisd226a512017-07-14 10:37:19 -070028 uint8_t fde_address_encoding = 0;
29 uint8_t lsda_encoding = 0;
Christopher Ferris8642fcb2017-04-24 11:14:39 -070030 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};
39
Christopher Ferris53a3c9b2017-05-10 18:34:15 -070040struct DwarfFde {
Christopher Ferris8642fcb2017-04-24 11:14:39 -070041 uint64_t cie_offset = 0;
42 uint64_t cfa_instructions_offset = 0;
43 uint64_t cfa_instructions_end = 0;
44 uint64_t pc_start = 0;
45 uint64_t pc_end = 0;
46 uint64_t lsda_address = 0;
Christopher Ferris53a3c9b2017-05-10 18:34:15 -070047 const DwarfCie* cie = nullptr;
Christopher Ferris8642fcb2017-04-24 11:14:39 -070048};
49
50constexpr uint16_t CFA_REG = static_cast<uint16_t>(-1);
51
Christopher Ferrisd226a512017-07-14 10:37:19 -070052} // namespace unwindstack
53
Christopher Ferris8642fcb2017-04-24 11:14:39 -070054#endif // _LIBUNWINDSTACK_DWARF_STRUCTS_H