Path: utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!TWG.COM!cwm From: cwm@TWG.COM (Chris Moore) Newsgroups: gnu.gcc.bug Subject: gcc 1.31 bug in asm header output on sun 386i Message-ID: <15438.597360766@twg.com> Date: 5 Dec 88 21:32:46 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 62 Only the base source filename (no path) shoult be output in the asm header on the sun 386i, the following is a fix: *** /mnt/src/uci/gnu/gcc-1.31/dbxout.c Tue Nov 29 08:57:36 1988 - --- dbxout.c Mon Nov 28 10:06:36 1988 *************** *** 220,225 **** - --- 220,253 ---- current_sym_nchars = 0; } + /* Tell the assembler the source file name. + + ASM_FILE is the assembler code output file, + INPUT_NAME is the name of the main input file. */ + + void + dbxout_filename (asm_file, input_name) + FILE *asm_file; + char *input_name; + { + int len = strlen (input_name); + char *na = input_name + len; + + /* NA gets INPUT_NAME sans directory names. */ + while (na > input_name) + { + if (na[-1] == '/') + break; + na--; + } + + #ifdef ASM_OUTPUT_SOURCE_FILENAME + ASM_OUTPUT_SOURCE_FILENAME (asm_file, na); + #else + fprintf (asm_file, "\t.file\t\"%s\"\n", na); + #endif + } + /* Output a reference to a type. If the type has not yet been described in the dbx output, output its definition now. For a type already defined, just refer to its definition *** /mnt/src/uci/gnu/gcc-1.31/tm-sun386.h Mon Nov 21 15:28:25 1988 - --- tm-sun386.h Mon Nov 28 10:44:49 1988 *************** *** 111,117 **** #define ASM_FILE_START(FILE) \ do { \ extern char *version_string, *language_string; \ ! fprintf(FILE, "\t.file\t\"%s\"\n", dump_base_name); \ fprintf(FILE, "\t.version\t\"%s %s\"\n", \ language_string, version_string); \ if (optimize) ASM_FILE_START_1 (FILE); \ - --- 111,117 ---- #define ASM_FILE_START(FILE) \ do { \ extern char *version_string, *language_string; \ ! dbxout_filename ((FILE), main_input_filename); \ fprintf(FILE, "\t.version\t\"%s %s\"\n", \ language_string, version_string); \ if (optimize) ASM_FILE_START_1 (FILE); \