This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Odd behavior with LBB/LBE labels
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Subject: Re: Odd behavior with LBB/LBE labels
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Sun, 15 Jul 2001 10:32:14 +0100
- Cc: gcc at gcc dot gnu dot org
Richard Kenner wrote:-
> After the recent debug hook change was installed, GNAT on ia32
> GNU/Linux with stabs started to emit LBB and LBE labels all of whose
> indices were zero. It's odd this should be language-dependent.
>
> Before I spend too much time digging in to this, does anybody have
> any idea what's going on?
Hi Richard,
That looks like the begin block and end block changes 2 revisions ago
in final.c (revision 1.182->1.183) whose diff I include below. I
don't see any change in behaviour - it just replaces conditionally
compiled blocks based on write_symbols with a single hook, its
destination determined by write_symblos, set in toplev.c based on
command line options.
Sorry, I don't know how this could have happened.
Neil.
Index: final.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/final.c,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -p -r1.182 -r1.183
--- final.c 2001/07/09 11:20:51 1.182
+++ final.c 2001/07/12 05:56:24 1.183
@@ -66,6 +66,7 @@ Boston, MA 02111-1307, USA. */
#include "intl.h"
#include "basic-block.h"
#include "target.h"
+#include "debug.h"
#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
#include "dbxout.h"
@@ -2138,27 +2139,8 @@ final_scan_insn (insn, file, optimize, p
++block_depth;
high_block_linenum = last_linenum;
- /* Output debugging info about the symbol-block beginning. */
-#ifdef SDB_DEBUGGING_INFO
- if (write_symbols == SDB_DEBUG)
- sdbout_begin_block (file, last_linenum, n);
-#endif
-#ifdef XCOFF_DEBUGGING_INFO
- if (write_symbols == XCOFF_DEBUG)
- xcoffout_begin_block (file, last_linenum, n);
-#endif
-#ifdef DBX_DEBUGGING_INFO
- if (write_symbols == DBX_DEBUG)
- ASM_OUTPUT_INTERNAL_LABEL (file, "LBB", n);
-#endif
-#ifdef DWARF_DEBUGGING_INFO
- if (write_symbols == DWARF_DEBUG)
- dwarfout_begin_block (n);
-#endif
-#ifdef DWARF2_DEBUGGING_INFO
- if (write_symbols == DWARF2_DEBUG)
- dwarf2out_begin_block (n);
-#endif
+ /* Output debugging info about the symbol-block beginning. */
+ (*debug_hooks->begin_block) (file, last_linenum, n);
/* Mark this block as output. */
TREE_ASM_WRITTEN (NOTE_BLOCK (insn)) = 1;
@@ -2180,26 +2162,7 @@ final_scan_insn (insn, file, optimize, p
if (block_depth < 0)
abort ();
-#ifdef XCOFF_DEBUGGING_INFO
- if (write_symbols == XCOFF_DEBUG)
- xcoffout_end_block (file, high_block_linenum, n);
-#endif
-#ifdef DBX_DEBUGGING_INFO
- if (write_symbols == DBX_DEBUG)
- ASM_OUTPUT_INTERNAL_LABEL (file, "LBE", n);
-#endif
-#ifdef SDB_DEBUGGING_INFO
- if (write_symbols == SDB_DEBUG)
- sdbout_end_block (file, high_block_linenum, n);
-#endif
-#ifdef DWARF_DEBUGGING_INFO
- if (write_symbols == DWARF_DEBUG)
- dwarfout_end_block (n);
-#endif
-#ifdef DWARF2_DEBUGGING_INFO
- if (write_symbols == DWARF2_DEBUG)
- dwarf2out_end_block (n);
-#endif
+ (*debug_hooks->end_block) (file, high_block_linenum, n);
}
break;