This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[C++/debug] SDB_DEBUG (-gcoff) vs record_builtin_type vs GAS
- From: Danny Smith <danny_smith_0000 at yahoo dot co dot nz>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 11 Jun 2004 08:56:15 +1200 (NZST)
- Subject: [C++/debug] SDB_DEBUG (-gcoff) vs record_builtin_type vs GAS
Hi,
I am getting many failures un g++.dg/debug failures on i686-pc-mingw32
all with -gcoff flag These have also been report on cygwin at
http://gcc.gnu.org/ml/gcc-testresults/2004-06/msg00363.html
and earlier
The fails are due to the output of type decls by debug_hooks->type_decl
in cp/decl.c: record_builtin_type, starting here:
2004-02-12 Zack Weinberg <zack@codesourcery.com>
* 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,
Using GNU assembler version 2.15.91 (mingw32) using BFD version 2.15.91
20040520
I get assembler message:
Error: junk at end of line, first unrecognized character is `i'
I don't know anything about SDB debugging info, so first question is:
Is output of these type decls needed or useful for builtin types.with
SDB_DEBUG?
If not, then this patch will get rid of these failures.
Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1212
diff -c -3 -p -r1.1212 decl.c
*** decl.c 28 May 2004 21:58:15 -0000 1.1212
--- decl.c 10 Jun 2004 10:12:06 -0000
*************** record_builtin_type (enum rid rid_index,
*** 2738,2744 ****
if (!TYPE_NAME (type))
TYPE_NAME (type) = tdecl;
! if (tdecl)
debug_hooks->type_decl (tdecl, 0);
}
--- 2738,2746 ----
if (!TYPE_NAME (type))
TYPE_NAME (type) = tdecl;
! /* FIXME: GAS chokes on SDB .def statements that contain embedded
! spaces (like "unsigned long"). */
! if (tdecl && write_symbols != SDB_DEBUG)
debug_hooks->type_decl (tdecl, 0);
}
With above patch, all (648) expecteds in g++.dg/debug pass on i686-pc-mingw32
Second question:
If they are useful, is this a gcc bug (should names of builtin types be
mangled in sdbout.c or by target macro, to get rid of white space?) or should
gas be taught how to handle the white space?
Third question:
Does anybody really care about SDB_DEBUG? I don't, except about once
a year someone reports a bug when using -gcoff on mingw or cygwin. Now
that cygwin and mingw support Dwarf2 debug info in addition to DBX, I
have even less reason to care about SDB
Danny
Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com