This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch][C++/debug] SDB_DEBUG (-gcoff) vs record_builtin_type vs GAS - refresh
- From: Danny Smith <danny_smith_0000 at yahoo dot co dot nz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 30 Oct 2004 21:55:24 +1300 (NZDT)
- Subject: [Patch][C++/debug] SDB_DEBUG (-gcoff) vs record_builtin_type vs GAS - refresh
This is a slightly revised version of patch submitted here:
http://gcc.gnu.org/ml/gcc-patches/2004-06/msg01394.html
The following testsuite failures on cygwin and mingw all occur with -gcoff
They started failing with this patch:
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.
Prior to this, sdbout,c did not output defs for intrinsic types for C++
or C (or any other language AFAICT)
[An old version (1995) of sdbout.c had this in sdb_init()
#if 0 /* Nothing need be output for the predefined types. */
/* Get all permanent types that have typedef names,
and output them all, except for those already output. */
sdbout_typedefs (syms);
#endif
but that has been removed in a cleanup at some stage.]
The gas assembler does not know how to handle identifiers with
embedded spaces -- eg "unsigned long", so dies with C++ code
This is a regression (if you count breaking coff debugging
as a regression).
FAIL: g++.dg/debug/const1.C (test for excess errors)
FAIL: g++.dg/debug/const1.C (test for excess errors)
FAIL: g++.dg/debug/const1.C (test for excess errors)
FAIL: g++.dg/debug/const1.C (test for excess errors)
FAIL: g++.dg/debug/const1.C (test for excess errors)
FAIL: g++.dg/debug/const1.C (test for excess errors)
FAIL: g++.dg/debug/const1.C (test for excess errors)
FAIL: g++.dg/debug/const1.C (test for excess errors)
FAIL: g++.dg/debug/const1.C (test for excess errors)
FAIL: g++.dg/debug/debug4.C (test for excess errors)
FAIL: g++.dg/debug/debug4.C (test for excess errors)
FAIL: g++.dg/debug/debug4.C (test for excess errors)
FAIL: g++.dg/debug/debug4.C (test for excess errors)
FAIL: g++.dg/debug/debug4.C (test for excess errors)
FAIL: g++.dg/debug/debug4.C (test for excess errors)
FAIL: g++.dg/debug/debug4.C (test for excess errors)
FAIL: g++.dg/debug/debug4.C (test for excess errors)
FAIL: g++.dg/debug/debug4.C (test for excess errors)
FAIL: g++.dg/debug/trivial.C (test for excess errors)
WARNING: g++.dg/debug/trivial.C compilation failed to produce executable
FAIL: g++.dg/debug/trivial.C (test for excess errors)
WARNING: g++.dg/debug/trivial.C compilation failed to produce executable
FAIL: g++.dg/debug/trivial.C (test for excess errors)
WARNING: g++.dg/debug/trivial.C compilation failed to produce executable
FAIL: g++.dg/debug/trivial.C (test for excess errors)
WARNING: g++.dg/debug/trivial.C compilation failed to produce executable
FAIL: g++.dg/debug/trivial.C (test for excess errors)
WARNING: g++.dg/debug/trivial.C compilation failed to produce executable
FAIL: g++.dg/debug/trivial.C (test for excess errors)
WARNING: g++.dg/debug/trivial.C compilation failed to produce executable
FAIL: g++.dg/debug/trivial.C (test for excess errors)
WARNING: g++.dg/debug/trivial.C compilation failed to produce executable
FAIL: g++.dg/debug/trivial.C (test for excess errors)
WARNING: g++.dg/debug/trivial.C compilation failed to produce executable
FAIL: g++.dg/debug/trivial.C (test for excess errors)
WARNING: g++.dg/debug/trivial.C compilation failed to produce executable
The following patch prevents sdbout.c (sdbout_symbol) from outputting a
builtin type even if told to.
Tested on i686-pc-mingw32
2004-10-30 Danny Smith <dannysmith@users.sourceforge.net>
* sdbout.c (sdbout_symbol): Do not output type .def statements
for builtin types.
Index: sdbout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/sdbout.c,v
retrieving revision 1.96
diff -c -3 -p -r1.96 sdbout.c
*** sdbout.c 21 Oct 2004 00:53:28 -0000 1.96
--- sdbout.c 30 Oct 2004 08:52:53 -0000
*************** sdbout_symbol (tree decl, int local)
*** 737,742 ****
--- 737,747 ----
return;
if (DECL_IGNORED_P (decl))
return;
+ /* Don't output intrinsic types. GAS chokes on SDB .def
+ statements that contain identifiers with embedded spaces
+ (eg "unsigned long"). */
+ if (DECL_IS_BUILTIN (decl))
+ return;
/* Output typedef name. */
if (template_name_p (DECL_NAME (decl)))
Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com