]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
som.h (ASM_OUTPUT_SOURCE_LINE): Use targetm.strip_name_encoding to strip name encoding.
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Fri, 20 Jun 2003 14:08:35 +0000 (14:08 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Fri, 20 Jun 2003 14:08:35 +0000 (14:08 +0000)
* som.h (ASM_OUTPUT_SOURCE_LINE): Use targetm.strip_name_encoding to
strip name encoding.

From-SVN: r68267

gcc/ChangeLog
gcc/config/pa/som.h

index e4d1a887b9c06c683ca8d489b91c396d4850cee9..c12c7ff687298fcbaf4694aac1c965de3c555060 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       * som.h (ASM_OUTPUT_SOURCE_LINE): Use targetm.strip_name_encoding to
+       strip name encoding.
+
 2003-06-20  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
 
        * configure.in (gcc_cv_as_gstabs_flag): Disable if assembler warns.
index db31c6006fb967a9c7b62d7b8d02eb3eba421c11..6d34bf93fd3f0814153a1d43ff29dfe69756b252 100644 (file)
@@ -30,16 +30,20 @@ Boston, MA 02111-1307, USA.  */
 /* 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, counter)    \
-  { 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, counter,                   \
-              XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0) + 1, \
-              counter);                                \
-    else                                               \
-      fprintf (file, "\t.stabn 68,0,%d,0\n", line);    \
-    last_function_decl = current_function_decl;                \
+#define ASM_OUTPUT_SOURCE_LINE(file, line, counter)            \
+  { static tree last_function_decl = NULL;                     \
+    if (current_function_decl == last_function_decl)           \
+      {                                                                \
+       rtx func = DECL_RTL (current_function_decl);            \
+       const char *name = XSTR (XEXP (func, 0), 0);            \
+       fprintf (file, "\t.stabn 68,0,%d,L$M%d-%s\nL$M%d:\n",   \
+                line, counter,                                 \
+                (* targetm.strip_name_encoding) (name),        \
+                counter);                                      \
+      }                                                                \
+    else                                                       \
+      fprintf (file, "\t.stabn 68,0,%d,0\n", line);            \
+    last_function_decl = current_function_decl;                        \
   }
 
 /* gdb needs a null N_SO at the end of each file for scattered loading.  */