1 | /* dwarf2ctf.h - DWARF interface for CTF/BTF generation. |
2 | Copyright (C) 2021-2023 Free Software Foundation, Inc. |
3 | |
4 | This file is part of GCC. |
5 | |
6 | GCC is free software; you can redistribute it and/or modify it under |
7 | the terms of the GNU General Public License as published by the Free |
8 | Software Foundation; either version 3, or (at your option) any later |
9 | version. |
10 | |
11 | GCC is distributed in the hope that it will be useful, but WITHOUT ANY |
12 | WARRANTY; without even the implied warranty of MERCHANTABILITY or |
13 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
14 | for more details. |
15 | |
16 | You should have received a copy of the GNU General Public License |
17 | along with GCC; see the file COPYING3. If not see |
18 | <http://www.gnu.org/licenses/>. */ |
19 | |
20 | /* This file contains declarations and prototypes to define an interface |
21 | between DWARF and CTF/BTF generation. */ |
22 | |
23 | #ifndef GCC_DWARF2CTF_H |
24 | #define GCC_DWARF2CTF_H 1 |
25 | |
26 | #include "dwarf2out.h" |
27 | #include "flags.h" |
28 | |
29 | /* Debug Format Interface. Used in dwarf2out.cc. */ |
30 | |
31 | extern void ctf_debug_init (void); |
32 | extern void ctf_debug_init_postprocess (bool); |
33 | extern bool ctf_do_die (dw_die_ref); |
34 | extern void ctf_debug_early_finish (const char *); |
35 | extern void ctf_debug_finish (const char *); |
36 | |
37 | /* Wrappers for CTF/BTF to fetch information from GCC DWARF DIE. Used in |
38 | ctfc.cc. |
39 | |
40 | A CTF container does not store all debug information internally. Some of |
41 | the info is fetched indirectly via the DIE reference available in each CTF |
42 | container entry. |
43 | |
44 | These functions will be used by the CTF container to give access to its |
45 | consumers (CTF/BTF) to various debug information available in DWARF DIE. |
46 | Direct access to debug information in GCC dwarf structures by the consumers |
47 | of CTF/BTF information is not ideal. */ |
48 | |
49 | /* Source location information. */ |
50 | |
51 | extern const char * ctf_get_die_loc_file (dw_die_ref); |
52 | extern unsigned int ctf_get_die_loc_line (dw_die_ref); |
53 | extern unsigned int ctf_get_die_loc_col (dw_die_ref); |
54 | |
55 | #endif /* GCC_DWARF2CTF_H */ |
56 | |