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