| 1 | /*
|
|---|
| 2 | * Copyright (c) 2023 Jiří Zárevúcky
|
|---|
| 3 | * All rights reserved.
|
|---|
| 4 | *
|
|---|
| 5 | * Redistribution and use in source and binary forms, with or without
|
|---|
| 6 | * modification, are permitted provided that the following conditions
|
|---|
| 7 | * are met:
|
|---|
| 8 | *
|
|---|
| 9 | * - Redistributions of source code must retain the above copyright
|
|---|
| 10 | * notice, this list of conditions and the following disclaimer.
|
|---|
| 11 | * - Redistributions in binary form must reproduce the above copyright
|
|---|
| 12 | * notice, this list of conditions and the following disclaimer in the
|
|---|
| 13 | * documentation and/or other materials provided with the distribution.
|
|---|
| 14 | * - The name of the author may not be used to endorse or promote products
|
|---|
| 15 | * derived from this software without specific prior written permission.
|
|---|
| 16 | *
|
|---|
| 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|---|
| 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|---|
| 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|---|
| 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|---|
| 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|---|
| 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|---|
| 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|---|
| 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|---|
| 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|---|
| 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|---|
| 27 | */
|
|---|
| 28 |
|
|---|
| 29 | #ifndef DWARFS_CONSTANTS_H_
|
|---|
| 30 | #define DWARFS_CONSTANTS_H_
|
|---|
| 31 |
|
|---|
| 32 | enum {
|
|---|
| 33 | DW_SECT_INFO = 1, // .debug_info.dwo
|
|---|
| 34 | DW_SECT_ABBREV = 3, // .debug_abbrev.dwo
|
|---|
| 35 | DW_SECT_LINE = 4, // .debug_line.dwo
|
|---|
| 36 | DW_SECT_LOCLISTS = 5, // .debug_loclists.dwo
|
|---|
| 37 | DW_SECT_STR_OFFSETS = 6, // .debug_str_offsets.dwo
|
|---|
| 38 | DW_SECT_MACRO = 7, // .debug_macro.dwo
|
|---|
| 39 | DW_SECT_RNGLISTS = 8, // .debug_rnglists.dwo
|
|---|
| 40 | };
|
|---|
| 41 |
|
|---|
| 42 | // ^(DW_[^ ]*) [‡† ]*([^ ]*).*
|
|---|
| 43 |
|
|---|
| 44 | #define CVAL(name, value) name = value,
|
|---|
| 45 |
|
|---|
| 46 | enum {
|
|---|
| 47 | #include "constants/dw_ut.inc"
|
|---|
| 48 |
|
|---|
| 49 | DW_UT_lo_user = 0x80,
|
|---|
| 50 | DW_UT_hi_user = 0xff,
|
|---|
| 51 | };
|
|---|
| 52 |
|
|---|
| 53 | enum {
|
|---|
| 54 | #include "constants/dw_tag.inc"
|
|---|
| 55 |
|
|---|
| 56 | DW_TAG_lo_user = 0x4080,
|
|---|
| 57 | DW_TAG_hi_user = 0xffff,
|
|---|
| 58 | };
|
|---|
| 59 |
|
|---|
| 60 | enum {
|
|---|
| 61 | #include "constants/dw_at.inc"
|
|---|
| 62 |
|
|---|
| 63 | DW_AT_lo_user = 0x2000,
|
|---|
| 64 | DW_AT_hi_user = 0x3fff,
|
|---|
| 65 | };
|
|---|
| 66 |
|
|---|
| 67 | enum {
|
|---|
| 68 | #include "constants/dw_form.inc"
|
|---|
| 69 | };
|
|---|
| 70 |
|
|---|
| 71 | enum {
|
|---|
| 72 | #include "constants/dw_op.inc"
|
|---|
| 73 |
|
|---|
| 74 | DW_OP_lo_user = 0xe0,
|
|---|
| 75 | DW_OP_hi_user = 0xff,
|
|---|
| 76 | };
|
|---|
| 77 |
|
|---|
| 78 | enum {
|
|---|
| 79 | #include "constants/dw_lle.inc"
|
|---|
| 80 | };
|
|---|
| 81 |
|
|---|
| 82 | enum {
|
|---|
| 83 | #include "constants/dw_ate.inc"
|
|---|
| 84 |
|
|---|
| 85 | DW_ATE_lo_user = 0x80,
|
|---|
| 86 | DW_ATE_hi_user = 0xff,
|
|---|
| 87 | };
|
|---|
| 88 |
|
|---|
| 89 | enum {
|
|---|
| 90 | #include "constants/dw_ds.inc"
|
|---|
| 91 | };
|
|---|
| 92 |
|
|---|
| 93 | enum {
|
|---|
| 94 | #include "constants/dw_end.inc"
|
|---|
| 95 |
|
|---|
| 96 | DW_END_lo_user = 0x40,
|
|---|
| 97 | DW_END_hi_user = 0xff,
|
|---|
| 98 | };
|
|---|
| 99 |
|
|---|
| 100 | enum {
|
|---|
| 101 | #include "constants/dw_access.inc"
|
|---|
| 102 | };
|
|---|
| 103 |
|
|---|
| 104 | enum {
|
|---|
| 105 | #include "constants/dw_vis.inc"
|
|---|
| 106 | };
|
|---|
| 107 |
|
|---|
| 108 | enum {
|
|---|
| 109 | #include "constants/dw_virtuality.inc"
|
|---|
| 110 | };
|
|---|
| 111 |
|
|---|
| 112 | enum {
|
|---|
| 113 | #include "constants/dw_lang.inc"
|
|---|
| 114 |
|
|---|
| 115 | DW_LANG_lo_user = 0x8000,
|
|---|
| 116 | DW_LANG_hi_user = 0xffff,
|
|---|
| 117 | };
|
|---|
| 118 |
|
|---|
| 119 | enum {
|
|---|
| 120 | DW_ADDR_none = 0,
|
|---|
| 121 | };
|
|---|
| 122 |
|
|---|
| 123 | enum {
|
|---|
| 124 | #include "constants/dw_id.inc"
|
|---|
| 125 | };
|
|---|
| 126 |
|
|---|
| 127 | enum {
|
|---|
| 128 | #include "constants/dw_cc.inc"
|
|---|
| 129 |
|
|---|
| 130 | DW_CC_lo_user = 0x40,
|
|---|
| 131 | DW_CC_hi_user = 0xff,
|
|---|
| 132 | };
|
|---|
| 133 |
|
|---|
| 134 | enum {
|
|---|
| 135 | #include "constants/dw_lns.inc"
|
|---|
| 136 | };
|
|---|
| 137 |
|
|---|
| 138 | enum {
|
|---|
| 139 | #include "constants/dw_lne.inc"
|
|---|
| 140 |
|
|---|
| 141 | DW_LNE_lo_user = 0x80,
|
|---|
| 142 | DW_LNE_hi_user = 0xff,
|
|---|
| 143 | };
|
|---|
| 144 |
|
|---|
| 145 | enum {
|
|---|
| 146 | #include "constants/dw_lnct.inc"
|
|---|
| 147 |
|
|---|
| 148 | DW_LNCT_lo_user = 0x2000,
|
|---|
| 149 | DW_LNCT_hi_user = 0x3fff,
|
|---|
| 150 | };
|
|---|
| 151 |
|
|---|
| 152 | #undef CVAL
|
|---|
| 153 |
|
|---|
| 154 | typedef unsigned dw_ut_t;
|
|---|
| 155 | typedef unsigned dw_tag_t;
|
|---|
| 156 | typedef unsigned dw_at_t;
|
|---|
| 157 | typedef unsigned dw_form_t;
|
|---|
| 158 | typedef unsigned dw_op_t;
|
|---|
| 159 | typedef unsigned dw_lle_t;
|
|---|
| 160 | typedef unsigned dw_ate_t;
|
|---|
| 161 | typedef unsigned dw_ds_t;
|
|---|
| 162 | typedef unsigned dw_end_t;
|
|---|
| 163 | typedef unsigned dw_access_t;
|
|---|
| 164 | typedef unsigned dw_vis_t;
|
|---|
| 165 | typedef unsigned dw_virtuality_t;
|
|---|
| 166 | typedef unsigned dw_lang_t;
|
|---|
| 167 | typedef unsigned dw_id_t;
|
|---|
| 168 | typedef unsigned dw_cc_t;
|
|---|
| 169 | typedef unsigned dw_lns_t;
|
|---|
| 170 | typedef unsigned dw_lne_t;
|
|---|
| 171 | typedef unsigned dw_lnct_t;
|
|---|
| 172 |
|
|---|
| 173 | #endif /* DWARFS_CONSTANTS_H_ */
|
|---|