diff options
author | Ian Lance Taylor <iant@google.com> | 2010-11-15 21:38:40 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2010-11-15 21:38:40 +0000 |
commit | c6a13190a1554ba9bb016e0cea2c1562a8278ab9 (patch) | |
tree | 3c5132e72169c26eb5dcd1aa3737556a21ce16c4 /gcc/toplev.c | |
parent | 11746b92d8023be7a074b788ab2e42fa6ad2f492 (diff) | |
download | gcc-c6a13190a1554ba9bb016e0cea2c1562a8278ab9.zip gcc-c6a13190a1554ba9bb016e0cea2c1562a8278ab9.tar.gz gcc-c6a13190a1554ba9bb016e0cea2c1562a8278ab9.tar.bz2 |
godump.c: New file.
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.
From-SVN: r166770
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 1b25485..3f158a4 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1916,6 +1916,12 @@ process_options (void) flag_var_tracking_uninit = 0; } + /* The debug hooks are used to implement -fdump-go-spec because it + gives a simple and stable API for all the information we need to + dump. */ + if (flag_dump_go_spec != NULL) + debug_hooks = dump_go_spec_init (flag_dump_go_spec, debug_hooks); + /* If the user specifically requested variable tracking with tagging uninitialized variables, we need to turn on variable tracking. (We already determined above that variable tracking is feasible.) */ |