1/* dwarf2ctf.h - DWARF interface for CTF/BTF generation.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 3, or (at your option) any later
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14for more details.
15
16You should have received a copy of the GNU General Public License
17along 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
31extern void ctf_debug_init (void);
32extern void ctf_debug_init_postprocess (bool);
33extern bool ctf_do_die (dw_die_ref);
34extern void ctf_debug_early_finish (const char *);
35extern 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
51extern const char * ctf_get_die_loc_file (dw_die_ref);
52extern unsigned int ctf_get_die_loc_line (dw_die_ref);
53extern unsigned int ctf_get_die_loc_col (dw_die_ref);
54
55#endif /* GCC_DWARF2CTF_H */
56

source code of gcc/dwarf2ctf.h