[gnu.gcc.bug] dbxout_block in gcc-1.34 for sun386i

daemon@tut.cis.ohio-state.edu (Admin) (04/17/89)

The label references by .stab lines for N_LBRAC and N_RBRAC have no
period whereas they have one inside functions. On the sun386, it
doesn't produce an unresolved symbol error in AS but the symbols are
set to zero and gdb can't use them.

Here is a ``ad hoc'' patch I made:

*** dbxout.c.~1~	Sat Mar  4 14:39:52 1989
--- dbxout.c	Mon Apr 17 17:45:29 1989
***************
*** 190,195 ****
--- 190,199 ----
  	   "\t.stabs \"%s\",%d,0,0,Ltext\nLtext:\n",
  	   input_file_name, N_SO);
  
+ #ifdef sun386
+   fprintf (asmfile, "gcc_compiled.:\n");
+ #endif
+ 
    next_type_number = 1;
    next_block_number = 2;
  
***************
*** 1090,1096 ****
--- 1094,1104 ----
  	  if (depth > 0)
  	    {
  	      blocknum = next_block_number++;
+ #ifdef sun386
+ 	      fprintf (asmfile, ".stabn %d,0,0,.LBB%d\n", N_LBRAC, blocknum);
+ #else
  	      fprintf (asmfile, ".stabn %d,0,0,LBB%d\n", N_LBRAC, blocknum);
+ #endif
  	    }
  
  	  /* Output the interior of the block.  */
***************
*** 1098,1104 ****
--- 1106,1116 ----
  
  	  /* Refer to the marker for the end of the block.  */
  	  if (depth > 0)
+ #ifdef sun386
+ 	    fprintf (asmfile, ".stabn %d,0,0,.LBE%d\n", N_RBRAC, blocknum);
+ #else
  	    fprintf (asmfile, ".stabn %d,0,0,LBE%d\n", N_RBRAC, blocknum);
+ #endif
  	}
        stmt = TREE_CHAIN (stmt);
      }