GDB (xrefs)
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1/* Common internal types for the DWARF reader
2
3 Copyright (C) 2017-2023 Free Software Foundation, Inc.
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"
24#include "gdbsupport/underlying.h"
25
26/* Offset relative to the start of its containing CU (compilation
27 unit). */
28DEFINE_OFFSET_TYPE (cu_offset, unsigned int);
29
30/* Offset relative to the start of its .debug_info or .debug_types
31 section. */
32DEFINE_OFFSET_TYPE (sect_offset, uint64_t);
33
34static inline char *
35sect_offset_str (sect_offset offset)
36{
37 return hex_string (to_underlying (offset));
38}
39
40#endif /* DWARF2_TYPES_H */
DEFINE_OFFSET_TYPE(cu_offset, unsigned int)
static char * sect_offset_str(sect_offset offset)
Definition types.h:35