]>
Commit | Line | Data |
---|---|---|
b23bf9f7 SM |
1 | /* Common internal types for the DWARF reader |
2 | ||
1d506c26 | 3 | Copyright (C) 2017-2024 Free Software Foundation, Inc. |
b23bf9f7 SM |
4 | |
5 | This file is part of GDB. | |
6 | ||
7 | This program is free software; you can redistribute it and/or modify | |
8 | it under the terms of the GNU General Public License as published by | |
9 | the Free Software Foundation; either version 3 of the License, or | |
10 | (at your option) any later version. | |
11 | ||
12 | This program is distributed in the hope that it will be useful, | |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
19 | ||
20 | #ifndef DWARF2_TYPES_H | |
21 | #define DWARF2_TYPES_H | |
22 | ||
23 | #include "gdbsupport/offset-type.h" | |
1298c32f | 24 | #include "gdbsupport/underlying.h" |
b23bf9f7 SM |
25 | |
26 | /* Offset relative to the start of its containing CU (compilation | |
27 | unit). */ | |
28 | DEFINE_OFFSET_TYPE (cu_offset, unsigned int); | |
29 | ||
30 | /* Offset relative to the start of its .debug_info or .debug_types | |
31 | section. */ | |
32 | DEFINE_OFFSET_TYPE (sect_offset, uint64_t); | |
33 | ||
34 | static inline char * | |
35 | sect_offset_str (sect_offset offset) | |
36 | { | |
37 | return hex_string (to_underlying (offset)); | |
38 | } | |
39 | ||
40 | #endif /* DWARF2_TYPES_H */ |