+2004-09-17 Devang Patel <dpatel@apple.com>
+
+ * dbxout.c (get_lang_number): New.
+ (dbxout_init): Include lang number in N_SO stab.
+ * dbxout.h (N_SO_AS, N_SO_C, N_SO_ANSI_C, N_SO_CC, N_SO_FORTRAN,
+ N_SO_PASCAL, N_SO_FORTRAN90, N_SO_OBJC, N_SO_OBJCPLUS): New #define.
+
2004-09-17 Diego Novillo <dnovillo@redhat.com>
PR tree-optimization/17273
static inline void emit_pending_bincls_if_required (void);
static void dbxout_init (const char *);
+static unsigned int get_lang_number (void);
static void dbxout_finish (const char *);
static void dbxout_start_source_file (unsigned, const char *);
static void dbxout_end_source_file (unsigned);
}
#endif /* DBX_DEBUGGING_INFO */
+/* Get lang description for N_SO stab. */
+
+static unsigned int
+get_lang_number (void)
+{
+ const char *language_string = lang_hooks.name;
+
+ if (strcmp (language_string, "GNU C") == 0)
+ return N_SO_C;
+ else if (strcmp (language_string, "GNU C++") == 0)
+ return N_SO_CC;
+ else if (strcmp (language_string, "GNU F77") == 0)
+ return N_SO_FORTRAN;
+ else if (strcmp (language_string, "GNU F95") == 0)
+ return N_SO_FORTRAN90; /* CHECKME */
+ else if (strcmp (language_string, "GNU Pascal") == 0)
+ return N_SO_PASCAL;
+ else if (strcmp (language_string, "GNU Objective-C") == 0)
+ return N_SO_OBJC;
+ else
+ return 0;
+
+}
+
/* At the beginning of compilation, start writing the symbol table.
Initialize `typevec' and output the standard data types of C. */
#else /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
fprintf (asmfile, "%s", ASM_STABS_OP);
output_quoted_string (asmfile, cwd);
- fprintf (asmfile, ",%d,0,0,", N_SO);
+ fprintf (asmfile, ",%d,0,%d,", N_SO, get_lang_number ());
assemble_name (asmfile, ltext_label_name);
fputc ('\n', asmfile);
#endif /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
/* Used to put `Ltext:' before the reference, but that loses on sun 4. */
fprintf (asmfile, "%s", ASM_STABS_OP);
output_quoted_string (asmfile, input_file_name);
- fprintf (asmfile, ",%d,0,0,", N_SO);
+ fprintf (asmfile, ",%d,0,%d,", N_SO, get_lang_number ());
assemble_name (asmfile, ltext_label_name);
fputc ('\n', asmfile);
text_section ();