This is the mail archive of the gcc@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]

Re: [C++/debug] SDB_DEBUG (-gcoff) vs record_builtin_type vs GAS


 --- Zack Weinberg wrote: 
> Danny Smith  writes:
> 
> >
> > 	* cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
> > 	* cp-tree.h: Don't declare cxx_builtin_type_decls.
> > 	* decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
> > 	(record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
> >
> > Calling this hook on builtin types when SDB_DEBUG is true  creates
> > def statements like:
> > 	.def	_long int;	.scl	13;	.type	05;	.endef
> >
> > GAS chokes on the embedded space in names like _long int,
> 
> Um, how did this used to work?  That is, what appeared in SDB debug
> output for fundamental types before this change?
> 


In earlier versions, SDB did not output fundamental type .defs. 

Perhaps the problem was really introduced with the earlier change
to debugs_hook structure

2004-02-12  Zack Weinberg  <zack@codesourcery.com>

	* debug.h (struct gcc_debug_hooks): Add type_decl field.
         ...

Looking at the 3.4.1 sources, the  sdbout_symbol() function in not called
for builtin types, but only in rest_of_[type|decl]_compilation on user-defined
symbols.

dbxout.c specifically handled builtin types itself, in dbxout_init()

 /* Make sure that types `int' and `char' have numbers 1 and 2.
     Definitions of other integer types will refer to those numbers.
     (Actually it should no longer matter what their numbers are.
     Also, if any types with tags have been defined, dbxout_symbol
     will output them first, so the numbers won't be 1 and 2.  That
     happens in C++.  So it's a good thing it should no longer matter).  */

#ifdef DBX_OUTPUT_STANDARD_TYPES
  DBX_OUTPUT_STANDARD_TYPES (syms);
#endif

  /* Get all permanent types that have typedef names, and output them
     all, except for those already output.  Some language front ends
     put these declarations in the top-level scope; some do not.  */
  dbxout_typedefs ((*lang_hooks.decls.builtin_type_decls) ());


But sdbout.c:sdbout_init()  didn't do anything like that.


Would a new debug hook
  void (* builtin_type_decl) (tree decl, int local);
that defaults to debug_nothing_tree_int in sdbout.c
but is  dbxout_type_decl in dbxout.c be acceptible?


Danny


Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com


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