OSDN Git Service

(DBX_OUTPUT_MAIN_SOURCE_DIRECTORY, DBX_OUTPUT_MAIN_SOURCE_FILENAME):
authoreggert <eggert@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Sep 1993 00:23:58 +0000 (00:23 +0000)
committereggert <eggert@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Sep 1993 00:23:58 +0000 (00:23 +0000)
Quote special characters in file names.
(DBX_OUTPUT_MAIN_SOURCE_FILE_END): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5498 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/xcoffout.h

index 9c38fc5..0fbd413 100644 (file)
@@ -124,7 +124,11 @@ extern char *xcoff_read_only_section_name;
 
 /* Write out main source file name using ".file" rather than ".stabs".  */
 #define DBX_OUTPUT_MAIN_SOURCE_FILENAME(FILE,FILENAME) \
-  fprintf (FILE, "\t.file\t\"%s\"\n", FILENAME);
+  do {                                         \
+    fprintf (FILE, "\t.file\t", FILENAME);     \
+    output_quoted_string (FILE, FILENAME);     \
+    fprintf (FILE, "\n");                      \
+  } while (0)
 
 #define ABS_OR_RELATIVE_LINENO(LINENO)         \
 ((xcoff_current_include_file                   \
@@ -142,10 +146,16 @@ extern char *xcoff_read_only_section_name;
 #define DBX_OUTPUT_SOURCE_FILENAME(FILE, FILENAME)     \
 {                                                      \
   if (xcoff_current_include_file)                      \
-    fprintf (FILE, "\t.ei\t\"%s\"\n", xcoff_current_include_file);\
+    {                                                  \
+      fprintf (FILE, "\t.ei\t");                       \
+      output_quoted_string (FILE, xcoff_current_include_file); \
+      fprintf (FILE, "\n");                            \
+    }                                                  \
   if (strcmp (main_input_filename, FILENAME))          \
     {                                                  \
-      fprintf (FILE, "\t.bi\t\"%s\"\n", FILENAME);     \
+      fprintf (FILE, "\t.bi\t");                       \
+      output_quoted_string (FILE, FILENAME);           \
+      fprintf (FILE, "\n");                            \
       xcoff_current_include_file = FILENAME;           \
     }                                                  \
   else                                                 \
@@ -157,8 +167,9 @@ extern char *xcoff_read_only_section_name;
 {                                                      \
   if (xcoff_current_include_file)                      \
     {                                                  \
-      fprintf ((FILE), "\t.ei\t\"%s\"\n",              \
-              xcoff_current_include_file);             \
+      fprintf (FILE, "\t.ei\t");                       \
+      output_quoted_string (FILE, xcoff_current_include_file); \
+      fprintf (FILE, "\n");                            \
       xcoff_current_include_file = NULL;               \
     }                                                  \
 }