GCC Middle and Back End API Reference
debug.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  gcc_debug_hooks

Typedefs

typedef hash_map< const_tree, int > decl_to_instance_map_t

Enumerations

enum  debug_external_ref_kind { DEBUG_DIE_REF , DEBUG_ABSTRACT_ORIGIN_REF }

Functions

void debug_nothing_void (void)
void debug_nothing_charstar (const char *)
void debug_nothing_int_int_charstar (unsigned int, unsigned int, const char *)
void debug_nothing_int_charstar (unsigned int, const char *)
void debug_nothing_int_int_charstar_int_bool (unsigned int, unsigned int, const char *, int, bool)
void debug_nothing_int (unsigned int)
void debug_nothing_int_int (unsigned int, unsigned int)
void debug_nothing_int_int_tree (unsigned int, unsigned int, tree)
void debug_nothing_tree (tree)
void debug_nothing_tree_tree (tree, tree)
void debug_nothing_tree_int (tree, int)
void debug_nothing_tree_tree_tree_bool_bool (tree, tree, tree, bool, bool)
bool debug_true_const_tree (const_tree)
void debug_nothing_rtx_insn (rtx_insn *)
void debug_nothing_rtx_code_label (rtx_code_label *)
bool debug_false_tree_charstarstar_uhwistar (tree, debug_external_ref_kind, const char **, unsigned HOST_WIDE_INT *)
void debug_nothing_tree_charstar_uhwi (tree, debug_external_ref_kind, const char *, unsigned HOST_WIDE_INT)
void copy_debug_abstract_origin (tree, tree)
void dwarf2out_begin_prologue (unsigned int, unsigned int, const char *)
void dwarf2out_vms_end_prologue (unsigned int, const char *)
void dwarf2out_vms_begin_epilogue (unsigned int, const char *)
void dwarf2out_end_epilogue (unsigned int, const char *)
void dwarf2out_frame_finish (void)
bool dwarf2out_do_eh_frame (void)
bool dwarf2out_do_frame (void)
bool dwarf2out_do_cfi_asm (void)
void dwarf2out_switch_text_section (void)
bool dwarf2out_default_as_loc_support (void)
bool dwarf2out_default_as_locview_support (void)
const struct gcc_debug_hooks * dump_go_spec_init (const char *, const struct gcc_debug_hooks *)
decl_to_instance_map_t * maybe_create_decl_to_instance_map (int count=13)

Variables

const struct gcc_debug_hooks * debug_hooks
const struct gcc_debug_hooks do_nothing_debug_hooks
const struct gcc_debug_hooks xcoff_debug_hooks
const struct gcc_debug_hooks dwarf2_debug_hooks
const struct gcc_debug_hooks dwarf2_lineno_debug_hooks
const struct gcc_debug_hooks vmsdbg_debug_hooks
decl_to_instance_map_t * decl_to_instance_map

Typedef Documentation

◆ decl_to_instance_map_t

Instance discriminator mapping table.  See final.cc.   

Enumeration Type Documentation

◆ debug_external_ref_kind

Debug hooks for GCC.
Copyright (C) 2001-2026 Free Software Foundation, Inc.

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3, or (at your option) any
later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   
This structure contains hooks for the debug information output
functions, accessed through the global instance debug_hooks set in
toplev.cc according to command line options.   
WARNING: Do not add new debug hook targets - DWARF will be the only
way to speak debug to the middle-end once we are able to get rid of
the remaining targets.  If you need alternate output formats instead
generate them off the DWARF representation.   
Kinds of references to early DWARF DIEs.   
Enumerator
DEBUG_DIE_REF 
DEBUG_ABSTRACT_ORIGIN_REF 

Function Documentation

◆ copy_debug_abstract_origin()

void copy_debug_abstract_origin ( tree dest,
tree source )
extern

◆ debug_false_tree_charstarstar_uhwistar()

bool debug_false_tree_charstarstar_uhwistar ( tree ,
debug_external_ref_kind ,
const char ** ,
unsigned HOST_WIDE_INT *  )
extern

◆ debug_nothing_charstar()

void debug_nothing_charstar ( const char * main_filename)
extern

◆ debug_nothing_int()

void debug_nothing_int ( unsigned int line)
extern

References debug_nothing_int().

Referenced by debug_nothing_int().

◆ debug_nothing_int_charstar()

void debug_nothing_int_charstar ( unsigned int line,
const char * text )
extern

◆ debug_nothing_int_int()

void debug_nothing_int_int ( unsigned int line,
unsigned int n )
extern

◆ debug_nothing_int_int_charstar()

void debug_nothing_int_int_charstar ( unsigned int line,
unsigned int column,
const char * text )
extern

◆ debug_nothing_int_int_charstar_int_bool()

void debug_nothing_int_int_charstar_int_bool ( unsigned int line,
unsigned int column,
const char * text,
int discriminator,
bool is_stmt )
extern

◆ debug_nothing_int_int_tree()

void debug_nothing_int_int_tree ( unsigned int line,
unsigned int n,
tree block )
extern

◆ debug_nothing_rtx_code_label()

void debug_nothing_rtx_code_label ( rtx_code_label * label)
extern

◆ debug_nothing_rtx_insn()

void debug_nothing_rtx_insn ( rtx_insn * insn)
extern

◆ debug_nothing_tree()

void debug_nothing_tree ( tree decl)
extern

References debug_nothing_tree().

Referenced by debug_nothing_tree().

◆ debug_nothing_tree_charstar_uhwi()

void debug_nothing_tree_charstar_uhwi ( tree ,
debug_external_ref_kind ,
const char * ,
unsigned HOST_WIDE_INT )
extern

◆ debug_nothing_tree_int()

void debug_nothing_tree_int ( tree decl,
int local )
extern

◆ debug_nothing_tree_tree()

void debug_nothing_tree_tree ( tree t1,
tree t2 )
extern

◆ debug_nothing_tree_tree_tree_bool_bool()

void debug_nothing_tree_tree_tree_bool_bool ( tree t1,
tree t2,
tree t3,
bool b1,
bool b2 )
extern

◆ debug_nothing_void()

void debug_nothing_void ( void )
extern
The do-nothing hooks.   
This file contains implementations of each debug hook that do
nothing.   

References debug_nothing_void().

Referenced by debug_nothing_void().

◆ debug_true_const_tree()

bool debug_true_const_tree ( const_tree block)
extern

◆ dump_go_spec_init()

◆ dwarf2out_begin_prologue()

◆ dwarf2out_default_as_loc_support()

bool dwarf2out_default_as_loc_support ( void )
extern
Return true if GCC configure detected assembler support for .loc.   

References DWARF2_ASM_LINE_DEBUG_INFO, and dwarf2out_default_as_loc_support().

Referenced by dwarf2out_default_as_loc_support(), and process_options().

◆ dwarf2out_default_as_locview_support()

bool dwarf2out_default_as_locview_support ( void )
extern
Return true if GCC configure detected assembler support for views
in .loc directives.   

References DWARF2_ASM_VIEW_DEBUG_INFO, and dwarf2out_default_as_locview_support().

Referenced by dwarf2out_default_as_locview_support(), and process_options().

◆ dwarf2out_do_cfi_asm()

◆ dwarf2out_do_eh_frame()

bool dwarf2out_do_eh_frame ( void )
extern
Decide whether to emit EH frame unwind information for the current
translation unit.   

References dwarf2out_do_eh_frame(), global_options, and UI_DWARF2.

Referenced by dwarf2out_begin_prologue(), dwarf2out_do_cfi_asm(), dwarf2out_do_eh_frame(), and dwarf2out_do_frame().

◆ dwarf2out_do_frame()

bool dwarf2out_do_frame ( void )
extern

◆ dwarf2out_end_epilogue()

void dwarf2out_end_epilogue ( unsigned int line,
const char * file )
extern

◆ dwarf2out_frame_finish()

void dwarf2out_frame_finish ( void )
extern

◆ dwarf2out_switch_text_section()

◆ dwarf2out_vms_begin_epilogue()

void dwarf2out_vms_begin_epilogue ( unsigned int line,
const char * file )
extern
Output a marker (i.e. a label) for the beginning of the generated code
for a function epilogue.  This gets called *before* the prologue code has
been generated.   

References asm_out_file, ASM_OUTPUT_DEBUG_LABEL, cfun, current_function_funcdef_no, dw_fde_node::dw_fde_vms_begin_epilogue, dwarf2out_vms_begin_epilogue(), EPILOGUE_BEGIN_LABEL, and MAX_ARTIFICIAL_LABEL_BYTES.

Referenced by dwarf2out_vms_begin_epilogue().

◆ dwarf2out_vms_end_prologue()

void dwarf2out_vms_end_prologue ( unsigned int line,
const char * file )
extern
Output a marker (i.e. a label) for the end of the generated code
for a function prologue.  This gets called *after* the prologue code has
been generated.   

References asm_out_file, ASM_OUTPUT_DEBUG_LABEL, cfun, current_function_funcdef_no, dwarf2out_vms_end_prologue(), MAX_ARTIFICIAL_LABEL_BYTES, and PROLOGUE_END_LABEL.

Referenced by dwarf2out_vms_end_prologue().

◆ maybe_create_decl_to_instance_map()

decl_to_instance_map_t * maybe_create_decl_to_instance_map ( int count = 13)
inline
Allocate decl_to_instance_map with COUNT slots to begin with, if it
* hasn't been allocated yet.   

References decl_to_instance_map, and maybe_create_decl_to_instance_map().

Referenced by input_struct_function_base(), and maybe_create_decl_to_instance_map().

Variable Documentation

◆ debug_hooks

◆ decl_to_instance_map

decl_to_instance_map_t* decl_to_instance_map
extern
Map DECLs to instance discriminators.  This is allocated and
defined in ada/gcc-interfaces/trans.cc, when compiling with -gnateS.
Mappings from this table are saved and restored for LTO, so
link-time compilation will have this map set, at least in
partitions containing at least one DECL with an associated instance
discriminator.   

Referenced by compute_discriminator(), map_decl_to_instance(), maybe_create_decl_to_instance_map(), and output_struct_function_base().

◆ do_nothing_debug_hooks

const struct gcc_debug_hooks do_nothing_debug_hooks
extern
Hooks for various debug formats.   
Do-nothing debug hooks for GCC.
Copyright (C) 2001-2026 Free Software Foundation, Inc.

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3, or (at your option) any
later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   
The do-nothing debug hooks.   

Referenced by toplev::main().

◆ dwarf2_debug_hooks

const struct gcc_debug_hooks dwarf2_debug_hooks
extern
The debug hooks structure.   

Referenced by process_options().

◆ dwarf2_lineno_debug_hooks

const struct gcc_debug_hooks dwarf2_lineno_debug_hooks
extern

Referenced by process_options().

◆ vmsdbg_debug_hooks

const struct gcc_debug_hooks vmsdbg_debug_hooks
extern

Referenced by process_options().

◆ xcoff_debug_hooks

const struct gcc_debug_hooks xcoff_debug_hooks
extern