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

Re: Debugging data on Alpha


On Fri, Dec 29, 2000 at 03:04:20PM -0500, Richard Kenner wrote:
> Missing just variables from nested scopes sounds much more like a
> problem in stabs generation to me, and David's comment adds weight to that.

I think you're right.

By inspection, there were no LBRAC/RBRAC pairs being output.
So we'd get labels for eg "$LBB554" but nothing would use them.

This appears to have been broken here

2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>

        * dbxout.c (dbxout_symbol): Change return type to int.
        (dbxout_symbol_location, dbxout_syms): Likewise.
        (dbxout_block): Don't emit LBRAC/RBRAC pairs for blocks without
        any locals. Use current_function_func_begin_label if set.

with some backwards logic on when blocks should be emitted.
Give the following a try.


r~


	* dbxout.c (dbxout_block): Invert logic on eliding LBRAC/RBRAC.
	Initialize variables properly for DBX_LBRAC_FIRST.

Index: dbxout.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/dbxout.c,v
retrieving revision 1.69
diff -c -p -d -r1.69 dbxout.c
*** dbxout.c	2000/12/02 00:18:46	1.69
--- dbxout.c	2000/12/30 18:48:20
*************** dbxout_block (block, depth, args)
*** 2641,2647 ****
       tree args;
  {
    int blocknum = -1;
-   int ignored;
  
  #if DBX_BLOCKS_FUNCTION_RELATIVE
    const char *begin_label; 
--- 2641,2646 ----
*************** dbxout_block (block, depth, args)
*** 2656,2667 ****
        /* Ignore blocks never expanded or otherwise marked as real.  */
        if (TREE_USED (block) && TREE_ASM_WRITTEN (block))
  	{
! #ifndef DBX_LBRAC_FIRST
  	  /* In dbx format, the syms of a block come before the N_LBRAC.
  	     If nothing is output, we don't need the N_LBRAC, either. */
! 	  ignored = 1;
  	  if (debug_info_level != DINFO_LEVEL_TERSE || depth == 0)
! 	    ignored = dbxout_syms (BLOCK_VARS (block));
  	  if (args)
  	    dbxout_reg_parms (args);
  #endif
--- 2655,2670 ----
        /* Ignore blocks never expanded or otherwise marked as real.  */
        if (TREE_USED (block) && TREE_ASM_WRITTEN (block))
  	{
! 	  int did_output;
! 
! #ifdef DBX_LBRAC_FIRST
! 	  did_output = 1;
! #else
  	  /* In dbx format, the syms of a block come before the N_LBRAC.
  	     If nothing is output, we don't need the N_LBRAC, either. */
! 	  did_output = 0;
  	  if (debug_info_level != DINFO_LEVEL_TERSE || depth == 0)
! 	    did_output = dbxout_syms (BLOCK_VARS (block));
  	  if (args)
  	    dbxout_reg_parms (args);
  #endif
*************** dbxout_block (block, depth, args)
*** 2670,2676 ****
  	     the block.  Use the block's tree-walk order to generate
  	     the assembler symbols LBBn and LBEn
  	     that final will define around the code in this block.  */
! 	  if (depth > 0 && !ignored)
  	    {
  	      char buf[20];
  	      blocknum = BLOCK_NUMBER (block);
--- 2673,2679 ----
  	     the block.  Use the block's tree-walk order to generate
  	     the assembler symbols LBBn and LBEn
  	     that final will define around the code in this block.  */
! 	  if (depth > 0 && did_output)
  	    {
  	      char buf[20];
  	      blocknum = BLOCK_NUMBER (block);
*************** dbxout_block (block, depth, args)
*** 2720,2726 ****
  	  dbxout_block (BLOCK_SUBBLOCKS (block), depth + 1, NULL_TREE);
  
  	  /* Refer to the marker for the end of the block.  */
! 	  if (depth > 0 && !ignored)
  	    {
  	      char buf[20];
  	      ASM_GENERATE_INTERNAL_LABEL (buf, "LBE", blocknum);
--- 2723,2729 ----
  	  dbxout_block (BLOCK_SUBBLOCKS (block), depth + 1, NULL_TREE);
  
  	  /* Refer to the marker for the end of the block.  */
! 	  if (depth > 0 && did_output)
  	    {
  	      char buf[20];
  	      ASM_GENERATE_INTERNAL_LABEL (buf, "LBE", blocknum);

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