comparison gcc/sdbout.c @ 67:f6334be47118

update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Mar 2011 17:18:12 +0900
parents b7f97abdc517
children 04ced10e8804
comparison
equal deleted inserted replaced
65:65488c3d617d 67:f6334be47118
1 /* Output sdb-format symbol table information from GNU compiler. 1 /* Output sdb-format symbol table information from GNU compiler.
2 Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2 Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 3 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
4 Free Software Foundation, Inc. 4 Free Software Foundation, Inc.
5 5
6 This file is part of GCC. 6 This file is part of GCC.
7 7
8 GCC is free software; you can redistribute it and/or modify it under 8 GCC is free software; you can redistribute it and/or modify it under
73 #include "regs.h" 73 #include "regs.h"
74 #include "flags.h" 74 #include "flags.h"
75 #include "insn-config.h" 75 #include "insn-config.h"
76 #include "reload.h" 76 #include "reload.h"
77 #include "output.h" 77 #include "output.h"
78 #include "toplev.h" 78 #include "diagnostic-core.h"
79 #include "tm_p.h" 79 #include "tm_p.h"
80 #include "gsyms.h" 80 #include "gsyms.h"
81 #include "langhooks.h" 81 #include "langhooks.h"
82 #include "target.h" 82 #include "target.h"
83 83
323 sdbout_end_prologue, /* end_prologue */ 323 sdbout_end_prologue, /* end_prologue */
324 #else 324 #else
325 sdbout_begin_prologue, /* begin_prologue */ 325 sdbout_begin_prologue, /* begin_prologue */
326 debug_nothing_int_charstar, /* end_prologue */ 326 debug_nothing_int_charstar, /* end_prologue */
327 #endif 327 #endif
328 debug_nothing_int_charstar, /* begin_epilogue */
328 sdbout_end_epilogue, /* end_epilogue */ 329 sdbout_end_epilogue, /* end_epilogue */
329 sdbout_begin_function, /* begin_function */ 330 sdbout_begin_function, /* begin_function */
330 sdbout_end_function, /* end_function */ 331 sdbout_end_function, /* end_function */
331 debug_nothing_tree, /* function_decl */ 332 debug_nothing_tree, /* function_decl */
332 sdbout_global_decl, /* global_decl */ 333 sdbout_global_decl, /* global_decl */
341 debug_nothing_tree, /* direct_call */ 342 debug_nothing_tree, /* direct_call */
342 debug_nothing_tree_int, /* virtual_call_token */ 343 debug_nothing_tree_int, /* virtual_call_token */
343 debug_nothing_rtx_rtx, /* copy_call_info */ 344 debug_nothing_rtx_rtx, /* copy_call_info */
344 debug_nothing_uid, /* virtual_call */ 345 debug_nothing_uid, /* virtual_call */
345 debug_nothing_tree_tree, /* set_name */ 346 debug_nothing_tree_tree, /* set_name */
346 0 /* start_end_main_source_file */ 347 0, /* start_end_main_source_file */
348 TYPE_SYMTAB_IS_POINTER /* tree_type_symtab_field */
347 }; 349 };
348 350
349 /* Return a unique string to name an anonymous type. */ 351 /* Return a unique string to name an anonymous type. */
350 352
351 static char * 353 static char *
491 type = TYPE_MAIN_VARIANT (type); 493 type = TYPE_MAIN_VARIANT (type);
492 494
493 switch (TREE_CODE (type)) 495 switch (TREE_CODE (type))
494 { 496 {
495 case VOID_TYPE: 497 case VOID_TYPE:
498 case NULLPTR_TYPE:
496 return T_VOID; 499 return T_VOID;
497 case BOOLEAN_TYPE: 500 case BOOLEAN_TYPE:
498 case INTEGER_TYPE: 501 case INTEGER_TYPE:
499 { 502 {
500 int size = int_size_in_bytes (type) * BITS_PER_UNIT; 503 int size = int_size_in_bytes (type) * BITS_PER_UNIT;
1480 sdbout_finish (const char *main_filename ATTRIBUTE_UNUSED) 1483 sdbout_finish (const char *main_filename ATTRIBUTE_UNUSED)
1481 { 1484 {
1482 size_t i; 1485 size_t i;
1483 tree decl; 1486 tree decl;
1484 1487
1485 for (i = 0; VEC_iterate (tree, deferred_global_decls, i, decl); i++) 1488 FOR_EACH_VEC_ELT (tree, deferred_global_decls, i, decl)
1486 sdbout_symbol (decl, 0); 1489 sdbout_symbol (decl, 0);
1487 } 1490 }
1488 1491
1489 /* Describe the beginning of an internal block within a function. 1492 /* Describe the beginning of an internal block within a function.
1490 Also output descriptions of variables defined in this block. 1493 Also output descriptions of variables defined in this block.
1699 for (t = nreverse (preinit_symbols); t; t = TREE_CHAIN (t)) 1702 for (t = nreverse (preinit_symbols); t; t = TREE_CHAIN (t))
1700 sdbout_symbol (TREE_VALUE (t), 0); 1703 sdbout_symbol (TREE_VALUE (t), 0);
1701 preinit_symbols = 0; 1704 preinit_symbols = 0;
1702 } 1705 }
1703 1706
1704 #else /* SDB_DEBUGGING_INFO */
1705
1706 /* This should never be used, but its address is needed for comparisons. */
1707 const struct gcc_debug_hooks sdb_debug_hooks =
1708 {
1709 0, /* init */
1710 0, /* finish */
1711 0, /* assembly_start */
1712 0, /* define */
1713 0, /* undef */
1714 0, /* start_source_file */
1715 0, /* end_source_file */
1716 0, /* begin_block */
1717 0, /* end_block */
1718 0, /* ignore_block */
1719 0, /* source_line */
1720 0, /* begin_prologue */
1721 0, /* end_prologue */
1722 0, /* end_epilogue */
1723 0, /* begin_function */
1724 0, /* end_function */
1725 0, /* function_decl */
1726 0, /* global_decl */
1727 0, /* type_decl */
1728 0, /* imported_module_or_decl */
1729 0, /* deferred_inline_function */
1730 0, /* outlining_inline_function */
1731 0, /* label */
1732 0, /* handle_pch */
1733 0, /* var_location */
1734 0, /* switch_text_section */
1735 0, /* direct_call */
1736 0, /* virtual_call_token */
1737 0, /* copy_call_info */
1738 0, /* virtual_call */
1739 0, /* set_name */
1740 0 /* start_end_main_source_file */
1741 };
1742
1743
1744 #endif /* SDB_DEBUGGING_INFO */ 1707 #endif /* SDB_DEBUGGING_INFO */
1745 1708
1746 #include "gt-sdbout.h" 1709 #include "gt-sdbout.h"