From abb6b720734c1fb17251defde364f9b1e39ebcfb Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 19 Jan 1994 23:08:37 -0700 Subject: pa.h (ASM_OUTPUT_SOURCE_LINE): Make the first source line stab for each procedure special to avoid the need... * pa.h (ASM_OUTPUT_SOURCE_LINE): Make the first source line stab for each procedure special to avoid the need for nasty hacks in GAS. From-SVN: r6402 --- gcc/config/pa/pa.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 5e382ab..b70cf15 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -105,14 +105,22 @@ extern int target_flags; compatable. */ #define DBX_BLOCKS_FUNCTION_RELATIVE 1 -/* Likewise for linenos. */ +/* Likewise for linenos. + + We make the first line stab special to avoid adding several + gross hacks to GAS. */ #undef ASM_OUTPUT_SOURCE_LINE #define ASM_OUTPUT_SOURCE_LINE(file, line) \ { static int sym_lineno = 1; \ - fprintf (file, "\t.stabn 68,0,%d,L$M%d-%s\nL$M%d:\n", \ - line, sym_lineno, \ - XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0) + 1, \ - sym_lineno); \ + static tree last_function_decl = NULL; \ + if (current_function_decl == last_function_decl) \ + fprintf (file, "\t.stabn 68,0,%d,L$M%d-%s\nL$M%d:\n", \ + line, sym_lineno, \ + XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0) + 1, \ + sym_lineno); \ + else \ + fprintf (file, "\t.stabn 68,0,%d,0\n", line); \ + last_function_decl = current_function_decl; \ sym_lineno += 1; } /* But, to make this work, we have to output the stabs for the function -- cgit v1.1