aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1994-01-19 23:08:37 -0700
committerJeff Law <law@gcc.gnu.org>1994-01-19 23:08:37 -0700
commitabb6b720734c1fb17251defde364f9b1e39ebcfb (patch)
tree1a6814a544f30b40fcdda46bca7df606a54e2148 /gcc
parentac7198efaf94ea5885d40d7b93fe404603e4a429 (diff)
downloadgcc-abb6b720734c1fb17251defde364f9b1e39ebcfb.zip
gcc-abb6b720734c1fb17251defde364f9b1e39ebcfb.tar.gz
gcc-abb6b720734c1fb17251defde364f9b1e39ebcfb.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/pa/pa.h18
1 files changed, 13 insertions, 5 deletions
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