GCC Middle and Back End API Reference
sdbout.c File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "debug.h"
#include "tree.h"
#include "ggc.h"
#include "vec.h"
#include "gt-sdbout.h"
Include dependency graph for sdbout.c:

Variables

static tree anonymous_types
static int unnamed_struct_number
static vec< tree, va_gc > * deferred_global_decls
static tree preinit_symbols
static bool sdbout_initialized

Variable Documentation

tree anonymous_types
static

Output sdb-format symbol table information from GNU compiler. Copyright (C) 1988-2013 Free Software Foundation, Inc.

This file is part of GCC.

GCC 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.

GCC 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 GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/. mike@.nosp@m.tred.nosp@m.ysvr..nosp@m.Tred.nosp@m.ydev..nosp@m.Unis.nosp@m.ys.CO.nosp@m.M says: I modified the struct.c example and have a nm of a .o resulting from the AT&T C compiler. From the example below I would conclude the following:

  1. All .defs from structures are emitted as scanned. The example below clearly shows the symbol table entries for BoxRec2 are after the first function.
  1. All functions and their locals (including statics) are emitted as scanned.
  1. All nested unnamed union and structure .defs must be emitted before the structure in which they are nested. The AT&T assembler is a one pass beast as far as symbolics are concerned.
  1. All structure .defs are emitted before the typedefs that refer to them.
  1. All top level static and external variable definitions are moved to the end of file with all top level statics occurring first before externs.
  1. All undefined references are at the end of the file.
vec<tree, va_gc>* deferred_global_decls
static

Declarations whose debug info was deferred till end of compilation.

tree preinit_symbols
static

The C front end may call sdbout_symbol before sdbout_init runs. We save all such decls in this list and output them when we get to sdbout_init.

bool sdbout_initialized
static
int unnamed_struct_number
static

Counter to generate unique "names" for nameless struct members.