This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Don't set DECL_IGNORED_P on a cdtor function


DECL_IGNORED_P shouldn't be set on any function which the user might
want to set a breakpoint in, or which might appear in a stack
backtrace, or which might crash.  This is especially bad for
backtraces, because DECL_IGNORED_P means that there's no DWARF frame
information, which might mean that no further backtracing is possible.

Bootstrapped & tested on powerpc-darwin8.

-- 
- Geoffrey Keating <geoffk@apple.com>

===File ~/patches/gcc-noignoreconstructor.patch=============
2007-10-04  Geoffrey Keating  <geoffk@apple.com>

	* cgraphunit.c (cgraph_build_static_cdtor): Don't set
	DECL_IGNORED_P.

Index: gcc/cgraphunit.c
===================================================================
--- gcc/cgraphunit.c	(revision 128879)
+++ gcc/cgraphunit.c	(working copy)
@@ -1400,7 +1400,6 @@
 
   resdecl = build_decl (RESULT_DECL, NULL_TREE, void_type_node);
   DECL_ARTIFICIAL (resdecl) = 1;
-  DECL_IGNORED_P (resdecl) = 1;
   DECL_RESULT (decl) = resdecl;
 
   allocate_struct_function (decl);
@@ -1408,7 +1407,6 @@
   TREE_STATIC (decl) = 1;
   TREE_USED (decl) = 1;
   DECL_ARTIFICIAL (decl) = 1;
-  DECL_IGNORED_P (decl) = 1;
   DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (decl) = 1;
   DECL_SAVED_TREE (decl) = body;
   TREE_PUBLIC (decl) = ! targetm.have_ctors_dtors;
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]