This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix N_BNSYM horkage on alpha
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: dpatel at apple dot com, geoffk at apple dot com
- Date: Fri, 13 Aug 2004 13:21:48 -0700
- Subject: Fix N_BNSYM horkage on alpha
This patch,
2004-08-12 Devang patel <dpatel@apple.com>
* dbxout.c (dbxout_begin_prologue): New function.
(dbx_debug_hooks): Use new begin prologue hook.
(dbxout_function_end): Emit N_ENSYM.
* stab.def (N_BNSYM, N_ENSYM): Define and document these two new stabs.
causes the Alpha stabs-to-mdebug converter to hork.
It's certain that we shouldn't be using the new stabs without
extensions enabled. It's also certain that if NO_DBX_FUNCTION_END
is defined, we're working with a stabs subset.
What I'm not certain about is dbxout_function_end not emitting N_ENSYM
(due to the placement of emission of that stab in the function) when
targetm.have_named_sections is false. I'm not sure how named sections
are related to this new stab. As is, we're certain to have mismatches.
Someone who cares about BNSYM/ENSYM should look into this. This patch
is just enough to get rid of the 200+ test failures introduced on Alpha.
r~
* dbxout.c (NO_DBX_FUNCTION_END): Default to zero.
(dbxout_function_end): Remove ifdefs for it.
(dbxout_begin_prologue): Protect N_BNSYM with it, and gdb extensions.
Index: dbxout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dbxout.c,v
retrieving revision 1.196
diff -c -p -d -r1.196 dbxout.c
*** dbxout.c 12 Aug 2004 21:32:54 -0000 1.196
--- dbxout.c 13 Aug 2004 20:13:11 -0000
*************** Software Foundation, 59 Temple Place - S
*** 146,151 ****
--- 146,155 ----
#define STABS_GCC_MARKER "gcc2_compiled."
#endif
+ #ifndef NO_DBX_FUNCTION_END
+ #define NO_DBX_FUNCTION_END 0
+ #endif
+
enum typestatus {TYPE_UNSEEN, TYPE_XREF, TYPE_DEFINED};
/* Structure recording information about a C data type.
*************** dbxout_function_end (void)
*** 464,472 ****
which may be undesirable, and is unnecessary if we do not have
named sections. */
if (!use_gnu_debug_info_extensions
- #if defined(NO_DBX_FUNCTION_END)
|| NO_DBX_FUNCTION_END
- #endif
|| !targetm.have_named_sections)
return;
--- 468,474 ----
*************** dbxout_source_file (FILE *file, const ch
*** 761,767 ****
static void
dbxout_begin_prologue (unsigned int lineno, const char *filename)
{
! if (!flag_debug_only_used_symbols)
fprintf (asmfile, "%s%d,0,0\n", ASM_STABD_OP, N_BNSYM);
dbxout_source_line (lineno, filename);
--- 763,771 ----
static void
dbxout_begin_prologue (unsigned int lineno, const char *filename)
{
! if (use_gnu_debug_info_extensions
! && !NO_DBX_FUNCTION_END
! && !flag_debug_only_used_symbols)
fprintf (asmfile, "%s%d,0,0\n", ASM_STABD_OP, N_BNSYM);
dbxout_source_line (lineno, filename);