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 #pragma once 18 19 #include <stdint.h> 20 21 namespace unwindstack { 22 23 enum DwarfEncoding : uint8_t { 24 DW_EH_PE_omit = 0xff, 25 26 DW_EH_PE_absptr = 0x00, 27 DW_EH_PE_uleb128 = 0x01, 28 DW_EH_PE_udata2 = 0x02, 29 DW_EH_PE_udata4 = 0x03, 30 DW_EH_PE_udata8 = 0x04, 31 DW_EH_PE_sleb128 = 0x09, 32 DW_EH_PE_sdata2 = 0x0a, 33 DW_EH_PE_sdata4 = 0x0b, 34 DW_EH_PE_sdata8 = 0x0c, 35 36 DW_EH_PE_pcrel = 0x10, 37 DW_EH_PE_textrel = 0x20, 38 DW_EH_PE_datarel = 0x30, 39 DW_EH_PE_funcrel = 0x40, 40 DW_EH_PE_aligned = 0x50, 41 42 // The following are special values used to encode CFA and OP operands. 43 DW_EH_PE_udata1 = 0x0d, 44 DW_EH_PE_sdata1 = 0x0e, 45 DW_EH_PE_block = 0x0f, 46 }; 47 48 } // namespace unwindstack 49