diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-15 21:38:40 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-15 21:38:40 +0000 |
commit | 929d2a9097b205cfadb9d05a1cb639716c0746f1 (patch) | |
tree | 3c5132e72169c26eb5dcd1aa3737556a21ce16c4 /gcc/tree.h | |
parent | 58abb8173d79bb2dabeab64e7f471b804b93c2ba (diff) | |
download | gcc-929d2a9097b205cfadb9d05a1cb639716c0746f1.tar.gz |
gcc/:
* godump.c: New file.
* common.opt (fdump-go-spec=): New option.
* tree.h: Add comments for TYPE_SYMTAB_ADDRESS and friends.
(TYPE_SYMTAB_IS_ADDRESS, TYPE_SYMTAB_IS_POINTER): Define.
(TYPE_SYMTAB_IS_DIE): Define.
(struct tree_type): Change GTY for symtab field to use
TYPE_SYMTAB_IS_ADDRESS and friends and to use a debug_hooks field
to pick the union field.
* debug.h (struct gcc_debug_hooks): Add tree_type_symtab_field.
(dump_go_spec_init): Declare.
* toplev.c (process_options): Handle flag_dump_go_spec.
* debug.c: Include "tree.h".
(do_nothing_debug_hooks): Set tree_type_symtab_field.
* dwarf2out.c (dwarf2_debug_hooks): Likewise.
* dbxout.c (dbx_debug_hooks): Likewise.
(xcoff_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* sdbout.c (sdb_debug_hooks): Likewise. Do not define if
SDB_DEBUGGING_INFO is not defined.
* doc/invoke.texi (Option Summary): Mention -fdump-go-spec.
(Overall Options): Document -fdump-go-spec.
* Makefile.in (OBJS-common): Add godump.o.
(debug.o): Add dependency on $(TREE_H).
(godump.o): New target.
(GTFILES): Add $(srcdir)/godump.c.
gcc/c-family/:
* c-lex.c (init_c_lex): Set macro debug callbacks if
flag_dump_go_spec is set.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166770 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/gcc/tree.h b/gcc/tree.h index d4827a63f1d..6ae90f4128a 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2076,9 +2076,6 @@ struct GTY(()) tree_block { #define TYPE_MIN_VALUE(NODE) (NUMERICAL_TYPE_CHECK (NODE)->type.minval) #define TYPE_MAX_VALUE(NODE) (NUMERICAL_TYPE_CHECK (NODE)->type.maxval) #define TYPE_PRECISION(NODE) (TYPE_CHECK (NODE)->type.precision) -#define TYPE_SYMTAB_ADDRESS(NODE) (TYPE_CHECK (NODE)->type.symtab.address) -#define TYPE_SYMTAB_POINTER(NODE) (TYPE_CHECK (NODE)->type.symtab.pointer) -#define TYPE_SYMTAB_DIE(NODE) (TYPE_CHECK (NODE)->type.symtab.die) #define TYPE_NAME(NODE) (TYPE_CHECK (NODE)->type.name) #define TYPE_NEXT_VARIANT(NODE) (TYPE_CHECK (NODE)->type.next_variant) #define TYPE_MAIN_VARIANT(NODE) (TYPE_CHECK (NODE)->type.main_variant) @@ -2300,6 +2297,33 @@ extern enum machine_mode vector_type_mode (const_tree); #define TYPE_CONTAINS_PLACEHOLDER_INTERNAL(NODE) \ (TYPE_CHECK (NODE)->type.contains_placeholder_bits) +/* The debug output functions use the symtab union field to store + information specific to the debugging format. The different debug + output hooks store different types in the union field. These three + macros are used to access different fields in the union. The debug + hooks are responsible for consistently using only a specific + macro. */ + +/* Symtab field as an integer. Used by stabs generator in dbxout.c to + hold the type's number in the generated stabs. */ +#define TYPE_SYMTAB_ADDRESS(NODE) (TYPE_CHECK (NODE)->type.symtab.address) + +/* Symtab field as a string. Used by COFF generator in sdbout.c to + hold struct/union type tag names. */ +#define TYPE_SYMTAB_POINTER(NODE) (TYPE_CHECK (NODE)->type.symtab.pointer) + +/* Symtab field as a pointer to a DWARF DIE. Used by DWARF generator + in dwarf2out.c to point to the DIE generated for the type. */ +#define TYPE_SYMTAB_DIE(NODE) (TYPE_CHECK (NODE)->type.symtab.die) + +/* The garbage collector needs to know the interpretation of the + symtab field. These constants represent the different types in the + union. */ + +#define TYPE_SYMTAB_IS_ADDRESS (0) +#define TYPE_SYMTAB_IS_POINTER (1) +#define TYPE_SYMTAB_IS_DIE (2) + struct die_struct; struct GTY(()) tree_type { @@ -2333,10 +2357,10 @@ struct GTY(()) tree_type { tree pointer_to; tree reference_to; union tree_type_symtab { - int GTY ((tag ("0"))) address; - const char * GTY ((tag ("1"))) pointer; - struct die_struct * GTY ((tag ("2"))) die; - } GTY ((desc ("debug_hooks == &sdb_debug_hooks ? 1 : debug_hooks == &dwarf2_debug_hooks ? 2 : 0"))) symtab; + int GTY ((tag ("TYPE_SYMTAB_IS_ADDRESS"))) address; + const char * GTY ((tag ("TYPE_SYMTAB_IS_POINTER"))) pointer; + struct die_struct * GTY ((tag ("TYPE_SYMTAB_IS_DIE"))) die; + } GTY ((desc ("debug_hooks->tree_type_symtab_field"))) symtab; tree name; tree minval; tree maxval; |