GCC Middle and Back End API Reference
dbxout.c File Reference

Data Structures

struct  typeinfo
struct  dbx_file

Enumerations

enum  typestatus { TYPE_UNSEEN, TYPE_XREF, TYPE_DEFINED }
enum  binclstatus { BINCL_NOT_REQUIRED, BINCL_PENDING, BINCL_PROCESSED }

Functions

static void emit_bincl_stab (const char *c)
static void emit_pending_bincls (void)
static void emit_pending_bincls_if_required (void)
static void dbxout_init (const char *)
static void dbxout_finish (const char *)
static void dbxout_start_source_file (unsigned, const char *)
static void dbxout_end_source_file (unsigned)
static void dbxout_typedefs (tree)
static void dbxout_type_index (tree)
static void dbxout_args (tree)
static void dbxout_type_fields (tree)
static void dbxout_type_method_1 (tree)
static void dbxout_type_methods (tree)
static void dbxout_range_type (tree, tree, tree)
static void dbxout_type (tree, int)
static bool print_int_cst_bounds_in_octal_p (tree, tree, tree)
static bool is_fortran (void)
static void dbxout_type_name (tree)
static void dbxout_class_name_qualifiers (tree)
static int dbxout_symbol_location (tree, tree, const char *, rtx)
static void dbxout_symbol_name (tree, const char *, int)
static void dbxout_common_name (tree, const char *, stab_code_type)
static const char * dbxout_common_check (tree, int *)
static void dbxout_global_decl (tree)
static void dbxout_type_decl (tree, int)
static void dbxout_handle_pch (unsigned)
static void debug_free_queue (void)
static void dbxout_source_line (unsigned int, const char *, int, bool)
static void dbxout_begin_prologue (unsigned int, const char *)
static void dbxout_source_file (const char *)
static void dbxout_function_end (tree)
static void dbxout_begin_function (tree)
static void dbxout_begin_block (unsigned, unsigned)
static void dbxout_end_block (unsigned, unsigned)
static void dbxout_function_decl (tree)
void dbxout_int ()
void dbxout_stab_value_zero ()
void dbxout_stab_value_label ()
void dbxout_stab_value_label_diff ()
void dbxout_stab_value_internal_label ()
void dbxout_stab_value_internal_label_diff (const char *stem, int *counterp, const char *base)
void dbxout_stabd ()
void dbxout_begin_stabn ()
void dbxout_begin_stabn_sline ()
void dbxout_begin_empty_stabs ()
void dbxout_begin_simple_stabs ()
void dbxout_begin_simple_stabs_desc ()
static void dbxout_begin_complex_stabs ()
static void dbxout_begin_complex_stabs_noforcetext ()
static void stabstr_D ()
static void stabstr_U ()
static void stabstr_O ()
static void stabstr_continue ()
static void dbxout_finish_complex_stabs (tree sym, stab_code_type code, rtx addr, const char *label, int number)
static void dbxout_function_end ()
static unsigned int get_lang_number ()
static void dbxout_init ()
static void dbxout_typedefs ()
static void emit_bincl_stab ()
static void dbxout_start_source_file (unsigned int line, const char *filename)
static void dbxout_end_source_file ()
static void dbxout_handle_pch ()
static void dbxout_block (tree, int, tree)
static void dbxout_source_file ()
static void dbxout_begin_prologue ()
static void dbxout_begin_block ()
static void dbxout_end_block ()
static void dbxout_function_decl ()
static void dbxout_global_decl ()
static void dbxout_type_decl ()
static void dbxout_finish ()
static void dbxout_type_index ()
static void debug_flush_symbol_queue ()
static void debug_queue_symbol ()
static void dbxout_type_fields ()
static void dbxout_type_method_1 ()
static void dbxout_type_methods ()
static void dbxout_range_type ()
static void dbxout_type ()
static bool print_int_cst_bounds_in_octal_p ()
static void dbxout_type_name ()
static void dbxout_class_name_qualifiers ()
static rtx dbxout_expand_expr ()
static int output_used_types_helper ()
static int output_types_sort ()
static void output_used_types ()
int dbxout_symbol ()
static int dbxout_symbol_location ()
static void dbxout_symbol_name ()
static void dbxout_common_name ()
static const char * dbxout_common_check ()
int dbxout_syms ()
void dbxout_parms ()
void dbxout_reg_parms ()
static void dbxout_args ()
static void dbx_output_lbrac (const char *label, const char *begin_label)
static void dbx_output_rbrac (const char *label, const char *begin_label)
static void dbxout_block ()
static void dbxout_begin_function ()
void default_stabs_asm_out_destructor (rtx symbol, int priority)
void default_stabs_asm_out_constructor (rtx symbol, int priority)

Variables

static struct typeinfotypevec
static int typevec_len
static int next_type_number
static tree preinit_symbols
static struct dbx_filecurrent_file
static int next_file_number
static int scope_labelno
static int dbxout_source_line_counter
static int source_label_number = 1
static const char * lastfile
static int lastfile_is_base
static int pending_bincls = 0
static const char * base_input_file
static struct obstack stabstr_ob
static size_t stabstr_last_contin_point
struct gcc_debug_hooks dbx_debug_hooks
struct gcc_debug_hooks xcoff_debug_hooks
static int debug_nesting = 0
static treesymbol_queue
static int symbol_queue_index = 0
static int symbol_queue_size = 0

Enumeration Type Documentation

Enumerator:
BINCL_NOT_REQUIRED 
BINCL_PENDING 
BINCL_PROCESSED 
enum typestatus
Enumerator:
TYPE_UNSEEN 
TYPE_XREF 
TYPE_DEFINED 

Function Documentation

static void dbx_output_lbrac ( const char *  label,
const char *  begin_label 
)
static
Subroutine of dbxout_block.  Emit an N_LBRAC stab referencing LABEL.
   BEGIN_LABEL is the name of the beginning of the function, which may
   be required.   

References dbxout_begin_stabn(), dbxout_stab_value_label(), and dbxout_stab_value_label_diff().

Referenced by dbxout_block().

static void dbx_output_rbrac ( const char *  label,
const char *  begin_label 
)
static
Subroutine of dbxout_block.  Emit an N_RBRAC stab referencing LABEL.
   BEGIN_LABEL is the name of the beginning of the function, which may
   be required.   

References dbxout_begin_stabn(), dbxout_stab_value_label(), and dbxout_stab_value_label_diff().

Referenced by dbxout_block().

static void dbxout_args ( tree  )
static

Referenced by dbxout_type().

static void dbxout_args ( )
static
Given a chain of ..._TYPE nodes (as come in a parameter list),
   output definitions of those names, in raw form  

References dbxout_type().

static void dbxout_begin_block ( unsigned  ,
unsigned   
)
static
static void dbxout_begin_block ( )
static
Describe the beginning of an internal block within a function.   

References asm_out_file, emit_pending_bincls_if_required(), and targetm.

static void dbxout_begin_complex_stabs ( )
static
The next set of functions are entirely concerned with production of
   "complex" .stabs directives: that is, .stabs directives whose
   strings have to be constructed piecemeal.  dbxout_type,
   dbxout_symbol, etc. use these routines heavily.  The string is queued
   up in an obstack, then written out by dbxout_finish_complex_stabs, which
   is also responsible for splitting it up if it exceeds DBX_CONTIN_LENGTH.
   (You might think it would be more efficient to go straight to stdio
   when DBX_CONTIN_LENGTH is 0 (i.e. no length limit) but that turns
   out not to be the case, and anyway this needs fewer #ifdefs.)   
Begin a complex .stabs directive.  If we can, write the initial
   ASM_STABS_OP to the asm_out_file.   

References asm_out_file, and emit_pending_bincls_if_required().

Referenced by dbxout_common_name(), dbxout_parms(), and dbxout_symbol().

static void dbxout_begin_complex_stabs_noforcetext ( )
static
As above, but do not force text or emit pending bincls.  This is
   used by dbxout_symbol_location, which needs to do something else.   

References asm_out_file.

Referenced by dbxout_symbol_location().

void dbxout_begin_empty_stabs ( )
Begin a .stabs directive with string "", type STYPE, and desc and
   other fields 0.  The value field is the responsibility of the
   caller.  This function cannot be used for .stabx directives.   

References asm_out_file, and dbxout_int().

Referenced by dbxout_finish(), and dbxout_function_end().

static void dbxout_begin_function ( tree  )
static

Referenced by dbxout_function_decl().

static void dbxout_begin_function ( )
static
Output the information about a function and its arguments and result.
   Usually this follows the function's code,
   but on some systems, it comes before.   

References dbxout_parms(), and dbxout_symbol().

static void dbxout_begin_prologue ( unsigned  int,
const char *   
)
static
static void dbxout_begin_prologue ( )
static
Output N_BNSYM, line number symbol entry, and local symbol at
   function scope   

References asm_out_file, dbxout_source_line(), dbxout_stabd(), emit_pending_bincls_if_required(), and targetm.

void dbxout_begin_simple_stabs ( )
Begin a .stabs directive with string STR, type STYPE, and desc 0.
   The value field is the responsibility of the caller.   

References asm_out_file, dbxout_int(), and output_quoted_string().

Referenced by dbxout_init(), dbxout_source_file(), default_stabs_asm_out_constructor(), default_stabs_asm_out_destructor(), and emit_bincl_stab().

void dbxout_begin_simple_stabs_desc ( )
As above but use SDESC for the desc field.   

References asm_out_file, dbxout_int(), and output_quoted_string().

Referenced by dbxout_init().

void dbxout_begin_stabn ( )
Write a .stabn directive with type STYPE.  This function stops
   short of emitting the value field, which is the responsibility of
   the caller (normally it will be either a symbol or the difference
   of two symbols).   

References asm_out_file, and dbxout_int().

Referenced by dbx_output_lbrac(), dbx_output_rbrac(), and dbxout_end_source_file().

void dbxout_begin_stabn_sline ( )
Write a .stabn directive with type N_SLINE and desc LINE.  As above,
   the value field is the responsibility of the caller.   

References asm_out_file, and dbxout_int().

Referenced by dbxout_source_line().

static void dbxout_block ( tree  ,
int  ,
tree   
)
static
static void dbxout_block ( )
static
Output everything about a symbol block (a BLOCK node
   that represents a scope level),
   including recursive output of contained blocks.

   BLOCK is the BLOCK node.
   DEPTH is its depth within containing symbol blocks.
   ARGS is usually zero; but for the outermost block of the
   body of a function, it is a chain of PARM_DECLs for the function parameters.
   We output definitions of all the register parms
   as if they were local variables of that block.

   If -g1 was used, we count blocks just the same, but output nothing
   except for the outermost block.

   Actually, BLOCK may be several blocks chained together.
   We handle them all in sequence.   

References dbx_output_lbrac(), dbx_output_rbrac(), dbxout_block(), dbxout_reg_parms(), dbxout_syms(), and DINFO_LEVEL_TERSE.

static void dbxout_class_name_qualifiers ( tree  )
static
static void dbxout_class_name_qualifiers ( )
static
Output leading leading struct or class names needed for qualifying
   type whose scope is limited to a struct or class.   

References dbxout_class_name_qualifiers(), and decl_type_context().

static const char* dbxout_common_check ( tree  ,
int *   
)
static
static const char* dbxout_common_check ( )
static
Check decl to determine whether it is a VAR_DECL destined for storage in a
   common area.  If it is, the return value will be a non-null string giving
   the name of the common storage block it will go into.  If non-null, the
   value is the offset into the common block for that symbol's storage.   

References dbxout_expand_expr(), error(), is_fortran(), and targetm.

static void dbxout_common_name ( tree  ,
const char *  ,
stab_code_type   
)
static

Referenced by dbxout_syms().

static void dbxout_common_name ( )
static
Output the common block name for DECL in a stabs.

   Symbols in global common (.comm) get wrapped with an N_BCOMM/N_ECOMM pair
   around each group of symbols in the same .comm area.  The N_GSYM stabs
   that are emitted only contain the offset in the common area.  This routine
   emits the N_BCOMM and N_ECOMM stabs.   

References dbxout_begin_complex_stabs(), and dbxout_finish_complex_stabs().

static void dbxout_end_block ( unsigned  ,
unsigned   
)
static
static void dbxout_end_block ( )
static
Describe the end line-number of an internal block within a function.   

References asm_out_file, emit_pending_bincls_if_required(), and targetm.

static void dbxout_end_source_file ( unsigned  )
static

Referenced by dbxout_handle_pch().

static void dbxout_end_source_file ( )
static
Revert to reading a previous source file.  Generate a N_EINCL stab.   

References BINCL_NOT_REQUIRED, BINCL_PROCESSED, dbx_file::bincl_status, dbxout_begin_stabn(), dbxout_stab_value_zero(), and dbx_file::next.

static rtx dbxout_expand_expr ( )
static
This is a specialized subset of expand_expr for use by dbxout_symbol in
   evaluating DECL_VALUE_EXPR.  In particular, we stop if we find decls that
   haven't been expanded, or if the expression is getting so complex we won't
   be able to represent it in stabs anyway.  Returns NULL on failure.   

References symtab_node_base::definition, expand_expr(), EXPAND_INITIALIZER, get_inner_reference(), host_integerp(), HOST_WIDE_INT, offset, varpool_node::symbol, targetm, tree_low_cst(), and varpool_get_node().

Referenced by dbxout_common_check(), and dbxout_symbol().

static void dbxout_finish ( const char *  )
static
static void dbxout_finish ( )
static
At the end of compilation, finish writing the symbol table.
   The default is to call debug_free_queue but do nothing else.   

References asm_out_file, dbxout_begin_empty_stabs(), dbxout_stab_value_internal_label(), debug_free_queue(), switch_to_section(), and text_section.

static void dbxout_finish_complex_stabs ( tree  sym,
stab_code_type  code,
rtx  addr,
const char *  label,
int  number 
)
static
Finish the emission of a complex .stabs directive.  When DBX_CONTIN_LENGTH
   is zero, this has only to emit the close quote and the remainder of
   the arguments.  When it is nonzero, the string has been marshalled in
   stabstr_ob, and this routine is responsible for breaking it up into
   DBX_CONTIN_LENGTH-sized chunks.

   SYM is the DECL of the symbol under consideration; it is used only
   for its DECL_SOURCE_LINE.  The other arguments are all passed directly
   to DBX_FINISH_STABS; see above for details.   

References asm_out_file, len, stabstr_ob, and strlen().

Referenced by dbxout_common_name(), dbxout_parms(), dbxout_symbol(), and dbxout_symbol_location().

static void dbxout_function_decl ( tree  )
static
static void dbxout_function_decl ( )
static
Output dbx data for a function definition.
   This includes a definition of the function name itself (a symbol),
   definitions of the parameters (locating them in the parameter list)
   and then output the block that makes up the function's body
   (including all the auto variables of the function).   

References dbxout_begin_function(), dbxout_block(), dbxout_function_end(), and emit_pending_bincls_if_required().

static void dbxout_function_end ( tree  )
static

Referenced by dbxout_function_decl().

static void dbxout_global_decl ( tree  )
static
static void dbxout_global_decl ( )
static
Debug information for a global DECL.  Called from toplev.c after
   compilation proper has finished.   

References dbxout_symbol().

static void dbxout_handle_pch ( unsigned  )
static
static void dbxout_handle_pch ( )
static
Handle a few odd cases that occur when trying to make PCH files work.   

References dbxout_end_source_file(), and dbxout_start_source_file().

static void dbxout_init ( const char *  )
static
void dbxout_int ( )
void dbxout_parms ( )
The following two functions output definitions of function parameters.
   Each parameter gets a definition locating it in the parameter list.
   Each parameter that is a register variable gets a second definition
   locating it in the register.

   Printing or argument lists in gdb uses the definitions that
   locate in the parameter list.  But reference to the variable in
   expressions uses preferentially the definition as a register.   
Output definitions, referring to storage in the parmlist,
   of all the parms in PARMS, which is a chain of PARM_DECL nodes.   

References dbxout_begin_complex_stabs(), dbxout_finish_complex_stabs(), dbxout_type(), debug_nesting, eliminate_regs(), emit_pending_bincls_if_required(), and leaf_renumber_regs_insn().

Referenced by dbxout_begin_function(), and xcoffout_begin_prologue().

static void dbxout_range_type ( tree  ,
tree  ,
tree   
)
static

Referenced by dbxout_type().

static void dbxout_range_type ( )
static
Emit a "range" type specification, which has the form:
   "r<index type>;<lower bound>;<upper bound>;".
   TYPE is an INTEGER_TYPE, LOW and HIGH are the bounds.   

References dbxout_type(), dbxout_type_index(), host_integerp(), print_int_cst_bounds_in_octal_p(), stabstr_D(), stabstr_O(), and tree_low_cst().

void dbxout_reg_parms ( )
Output definitions for the places where parms live during the function,
   when different from where they were passed, when the parms were passed
   in memory.

   It is not useful to do this for parms passed in registers
   that live during the function in different registers, because it is
   impossible to look in the passed register for the passed value,
   so we use the within-the-function register to begin with.

   PARMS is a chain of PARM_DECL nodes.   

References dbxout_symbol_location(), debug_nesting, and rtx_equal_p().

Referenced by dbxout_block(), and xcoffout_block().

static void dbxout_source_file ( const char *  )
static

Referenced by dbxout_source_line().

static void dbxout_source_file ( )
static
static void dbxout_source_line ( unsigned int  lineno,
const char *  filename,
int  discriminator,
bool  is_stmt 
)
static
The debug hooks structure.   
Output a line number symbol entry for source file FILENAME and line
   number LINENO.   

References asm_out_file, dbxout_begin_stabn_sline(), dbxout_source_file(), dbxout_stab_value_internal_label_diff(), and dbxout_stabd().

Referenced by dbxout_begin_prologue().

void dbxout_stab_value_internal_label ( )
Write out an internal label as the value of a stab, and immediately
   emit that internal label.  This should be used only when
   dbxout_stabd will not work.  STEM is the name stem of the label,
   COUNTERP is a pointer to a counter variable which will be used to
   guarantee label uniqueness.   

References asm_out_file, dbxout_stab_value_label(), gcc_debug_hooks::label, and targetm.

Referenced by dbxout_finish(), and dbxout_source_file().

void dbxout_stab_value_internal_label_diff ( const char *  stem,
int *  counterp,
const char *  base 
)
Write out the difference between BASE and an internal label as the
   value of a stab, and immediately emit that internal label.  STEM and
   COUNTERP are as for dbxout_stab_value_internal_label.   

References asm_out_file, dbxout_stab_value_label_diff(), gcc_debug_hooks::label, and targetm.

Referenced by dbxout_source_line().

void dbxout_stab_value_label ( )
void dbxout_stab_value_label_diff ( )
Write out the difference of two labels, LABEL - BASE, as the value
   of a stab.   

References asm_out_file, and assemble_name().

Referenced by dbx_output_lbrac(), dbx_output_rbrac(), dbxout_function_end(), and dbxout_stab_value_internal_label_diff().

void dbxout_stab_value_zero ( void  )
Primitives for emitting simple stabs directives.  All other stabs
   routines should use these functions instead of directly emitting
   stabs.  They are exported because machine-dependent code may need
   to invoke them, e.g. in a DBX_OUTPUT_* macro whose definition
   forwards to code in CPU.c.   
The following functions should all be called immediately after one
   of the dbxout_begin_stab* functions (below).  They write out
   various things as the value of a stab.   
Write out a literal zero as the value of a stab.   

References asm_out_file.

Referenced by dbxout_end_source_file(), dbxout_init(), and emit_bincl_stab().

void dbxout_stabd ( )
The following functions produce specific kinds of stab directives.   
Write a .stabd directive with type STYPE and desc SDESC to asm_out_file.   

References asm_out_file, and dbxout_int().

Referenced by dbxout_begin_prologue(), dbxout_function_end(), and dbxout_source_line().

static void dbxout_start_source_file ( unsigned  ,
const char *   
)
static

Referenced by dbxout_handle_pch().

static void dbxout_start_source_file ( unsigned int  line,
const char *  filename 
)
static
int dbxout_symbol ( )
static int dbxout_symbol_location ( tree  ,
tree  ,
const char *  ,
rtx   
)
static
static int dbxout_symbol_location ( )
static
Output the stab for DECL, a VAR_DECL, RESULT_DECL or PARM_DECL.
   Add SUFFIX to its name, if SUFFIX is not 0.
   Describe the variable as residing in HOME
   (usually HOME is DECL_RTL (DECL), but not always).
   Returns 1 if the stab was really emitted.   

References alter_subreg(), asm_out_file, data_section, dbxout_begin_complex_stabs_noforcetext(), dbxout_common_check(), dbxout_finish_complex_stabs(), dbxout_symbol_location(), dbxout_symbol_name(), dbxout_type(), decl_function_context(), emit_pending_bincls_if_required(), get_pool_constant_mark(), marked, lang_hooks::name, and switch_to_section().

static void dbxout_symbol_name ( tree  ,
const char *  ,
int   
)
static
static void dbxout_symbol_name ( )
static
Output the symbol name of DECL for a stabs, with suffix SUFFIX.
   Then output LETTER to indicate the kind of location the symbol has.   
int dbxout_syms ( )
Output definitions of all the decls in a chain. Return nonzero if
   anything was output  

References dbxout_common_check(), dbxout_common_name(), and dbxout_symbol().

Referenced by dbxout_block(), and xcoffout_block().

static void dbxout_type ( )
static
Output a reference to a type.  If the type has not yet been
   described in the dbx output, output its definition now.
   For a type already defined, just refer to its definition
   using the type number.

   If FULL is nonzero, and the type has been described only with
   a forward-reference, output the definition now.
   If FULL is zero in this case, just refer to the forward-reference
   using the number previously allocated.   

References dbxout_args(), dbxout_range_type(), dbxout_type(), dbxout_type_fields(), dbxout_type_index(), dbxout_type_methods(), dbxout_type_name(), debug_queue_symbol(), emit_pending_bincls_if_required(), typeinfo::file_number, dbx_file::file_number, host_integerp(), HOST_WIDE_INT, int_size_in_bytes(), memset(), lang_hooks::name, next_type_number, dbx_file::next_type_number, print_int_cst_bounds_in_octal_p(), stabstr_D(), stabstr_O(), stabstr_U(), typeinfo::status, subrange_type_for_debug_p(), tree_low_cst(), TYPE_DEFINED, typeinfo::type_number, TYPE_UNSEEN, TYPE_XREF, typevec, and typevec_len.

static void dbxout_type_decl ( tree  ,
int   
)
static
static void dbxout_type_decl ( )
static
This is just a function-type adapter; dbxout_symbol does exactly
   what we want but returns an int.   

References dbxout_symbol().

static void dbxout_type_fields ( tree  )
static

Referenced by dbxout_type().

static void dbxout_type_fields ( )
static
Subroutine of `dbxout_type'.  Output the type fields of TYPE.
   This must be a separate function because anonymous unions require
   recursive calls.   

References bit_position(), dbxout_type(), host_integerp(), int_bit_position(), stabstr_D(), and tree_low_cst().

static void dbxout_type_index ( tree  )
static

Referenced by dbxout_range_type(), and dbxout_type().

static void dbxout_type_index ( )
static
Output the index of a type.   

References typeinfo::file_number, stabstr_D(), typeinfo::type_number, and typevec.

static void dbxout_type_method_1 ( tree  )
static

Referenced by dbxout_type_methods().

static void dbxout_type_method_1 ( )
static
Subroutine of `dbxout_type_methods'.  Output debug info about the
   method described DECL.   

References dbxout_type(), host_integerp(), stabstr_D(), and tree_low_cst().

static void dbxout_type_methods ( tree  )
static

Referenced by dbxout_type().

static void dbxout_type_methods ( )
static
Subroutine of `dbxout_type'.  Output debug info about the methods defined
   in TYPE.   

References dbxout_type(), dbxout_type_method_1(), and last.

static void dbxout_type_name ( tree  )
static

Referenced by dbxout_type().

static void dbxout_type_name ( )
static
Output the name of type TYPE, with no punctuation.
   Such names can be set up either by typedef declarations
   or by struct, enum and union tags.   
static void dbxout_typedefs ( tree  )
static

Referenced by dbxout_init().

static void dbxout_typedefs ( )
static
Output any typedef names for types described by TYPE_DECLs in SYMS.   

References dbxout_symbol().

static void debug_flush_symbol_queue ( )
static
Generate the symbols for any queued up type symbols we encountered
   while generating the type info for some originally used symbol.
   This might generate additional entries in the queue.  Only when
   the nesting depth goes to 0 is this routine called.   

References dbxout_symbol(), debug_nesting, and symbol_queue_index.

static void debug_free_queue ( )
static
Free symbol queue.   

References free().

Referenced by dbxout_finish().

static void debug_queue_symbol ( )
static
Queue a type symbol needed as part of the definition of a decl
   symbol.  These symbols are generated when debug_flush_symbol_queue()
   is called.   

Referenced by dbxout_symbol(), dbxout_type(), and output_used_types().

void default_stabs_asm_out_constructor ( rtx  symbol,
int  priority 
)
Likewise for global constructors.   

References dbxout_begin_simple_stabs(), dbxout_stab_value_label(), and sorry().

void default_stabs_asm_out_destructor ( rtx  symbol,
int  priority 
)
Record an element in the table of global destructors.  SYMBOL is
   a SYMBOL_REF of the function to be called; PRIORITY is a number
   between 0 and MAX_INIT_PRIORITY.   

References dbxout_begin_simple_stabs(), dbxout_stab_value_label(), and sorry().

static void emit_bincl_stab ( const char *  c)
static

Referenced by emit_pending_bincls().

static void emit_bincl_stab ( )
static
Emit BINCL stab using given name.   

References dbxout_begin_simple_stabs(), and dbxout_stab_value_zero().

static void emit_pending_bincls_if_required ( void  )
inlinestatic
static unsigned int get_lang_number ( )
static
Get lang description for N_SO stab.   

References lang_hooks::name.

Referenced by dbxout_init(), and is_fortran().

static bool is_fortran ( void  )
static

References get_lang_number().

Referenced by dbxout_common_check().

static int output_types_sort ( )
static
This is a qsort callback which sorts types and declarations into a
   predictable order (types, then declarations, sorted by UID
   within).   

Referenced by output_used_types().

static void output_used_types ( )
static
Force all types used by this function to be output in debug
   information.   

References cfun, debug_queue_symbol(), output_types_sort(), output_used_types_helper(), type(), and function::used_types_hash.

Referenced by dbxout_symbol().

static int output_used_types_helper ( )
static
Helper function for output_used_types.  Queue one entry from the
   used types hash to be output.   

Referenced by output_used_types().

static bool print_int_cst_bounds_in_octal_p ( tree  ,
tree  ,
tree   
)
static

Referenced by dbxout_range_type(), and dbxout_type().

static bool print_int_cst_bounds_in_octal_p ( )
static
Return nonzero if the given type represents an integer whose bounds
   should be printed in octal format.   

References HOST_BITS_PER_WIDE_INT.

static void stabstr_continue ( )
inlinestatic
Called whenever it is safe to break a stabs string into multiple
   .stabs directives.  If the current string has exceeded the limit
   set by DBX_CONTIN_LENGTH, mark the current position in the buffer
   as a continuation point by inserting DBX_CONTIN_CHAR (doubled if
   it is a backslash) and a null character.   

References stabstr_ob.

static void stabstr_D ( )
static
Add NUM, a signed decimal number, to the string being built.   

References stabstr_ob.

Referenced by dbxout_range_type(), dbxout_symbol(), dbxout_type(), dbxout_type_fields(), dbxout_type_index(), and dbxout_type_method_1().

static void stabstr_O ( )
static
Add CST, an INTEGER_CST tree, to the string being built as an
   unsigned octal number.  This routine handles values which are
   larger than a single HOST_WIDE_INT.   

References HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, and stabstr_ob.

Referenced by dbxout_range_type(), and dbxout_type().

static void stabstr_U ( )
static
Add NUM, an unsigned decimal number, to the string being built.   

References stabstr_ob.

Referenced by dbxout_type().


Variable Documentation

const char* base_input_file
static
The original input file name.   

Referenced by dbxout_source_file().

struct dbx_file* current_file
static
This is the top of the stack.

   This is not saved for PCH, because restoring a PCH should not change it.
   next_file_number does have to be saved, because the PCH may use some
   file numbers; however, just before restoring a PCH, next_file_number
   should always be 0 because we should not have needed any file numbers
   yet.   

Referenced by dbxout_start_source_file(), emit_pending_bincls(), and lto_input_location().

struct gcc_debug_hooks dbx_debug_hooks

Referenced by process_options().

int dbxout_source_line_counter
static
A counter for dbxout_source_line.   
int debug_nesting = 0
static
When -gused is used, emit debug info for only used symbols. But in
   addition to the standard intercepted debug_hooks there are some
   direct calls into this file, i.e., dbxout_symbol, dbxout_parms, and
   dbxout_reg_params.  Those routines may also be called from a higher
   level intercepted routine. So to prevent recording data for an inner
   call to one of these for an intercept, we maintain an intercept
   nesting counter (debug_nesting). We only save the intercepted
   arguments if the nesting is 1.   

Referenced by dbxout_parms(), dbxout_reg_parms(), dbxout_symbol(), and debug_flush_symbol_queue().

const char* lastfile
static
Last source file name mentioned in a NOTE insn.   
int lastfile_is_base
static
Used by PCH machinery to detect if 'lastfile' should be reset to
   base_input_file.   
int next_file_number
static
This is the next file number to use.   
int next_type_number
static
In dbx output, each type gets a unique number.
   This is the number for the next type output.
   The number, once assigned, is in the TYPE_SYMTAB_ADDRESS field.   

Referenced by dbxout_init(), and dbxout_type().

int pending_bincls = 0
static
Typical USG systems don't have stab.h, and they also have
   no use for DBX-format debugging info.   
If zero then there is no pending BINCL.   
tree preinit_symbols
static
The C front end may call dbxout_symbol before dbxout_init runs.
   We save all such decls in this list and output them when we get
   to dbxout_init.   

Referenced by dbxout_init(), and dbxout_symbol().

int scope_labelno
static
A counter for dbxout_function_end.   
int source_label_number = 1
static
Number for the next N_SOL filename stabs label.  The number 0 is reserved
   for the N_SO filename stabs label.   
size_t stabstr_last_contin_point
static
struct obstack stabstr_ob
static
This obstack holds the stab string currently being constructed.  We
   build it up here, then write it out, so we can split long lines up
   properly (see dbxout_finish_complex_stabs).   

Referenced by dbxout_finish_complex_stabs(), dbxout_init(), stabstr_continue(), stabstr_D(), stabstr_O(), and stabstr_U().

tree* symbol_queue
static
int symbol_queue_index = 0
static
int symbol_queue_size = 0
static
struct typeinfo* typevec
static
Vector recording information about C data types.
   When we first notice a data type (a tree node),
   we assign it a number using next_type_number.
   That is its index in this vector.   

Referenced by dbxout_init(), dbxout_symbol(), dbxout_type(), and dbxout_type_index().

int typevec_len
static
Number of elements of space allocated in `typevec'.   

Referenced by dbxout_init(), and dbxout_type().

struct gcc_debug_hooks xcoff_debug_hooks

Referenced by process_options().