1 /* dwarf2ctf.h - DWARF interface for CTF/BTF generation.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
4 This file is part of GCC.
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
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
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/>. */
20 /* This file contains declarations and prototypes to define an interface
21 between DWARF and CTF/BTF generation. */
23 #ifndef GCC_DWARF2CTF_H
24 #define GCC_DWARF2CTF_H 1
26 #include "dwarf2out.h"
29 /* Debug Format Interface. Used in dwarf2out.cc. */
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 *);
37 /* Wrappers for CTF/BTF to fetch information from GCC DWARF DIE. Used in
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
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. */
49 /* Source location information. */
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
);
55 #endif /* GCC_DWARF2CTF_H */