aboutsummaryrefslogtreecommitdiff
path: root/gdb/buildsym.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1995-02-12 17:53:34 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1995-02-12 17:53:34 +0000
commit21af55c92d1da8777dd6b71b686f6672670bf3ba (patch)
treed147bd47af85b3be48fc33d189d6fd729a352a8b /gdb/buildsym.c
parentd05baf08ac20a567ab098eaa468c7160b5d8cfc2 (diff)
downloadgdb-21af55c92d1da8777dd6b71b686f6672670bf3ba.zip
gdb-21af55c92d1da8777dd6b71b686f6672670bf3ba.tar.gz
gdb-21af55c92d1da8777dd6b71b686f6672670bf3ba.tar.bz2
* buildsym.c (start_subfile): Set language for f2c like for cfront.
Diffstat (limited to 'gdb/buildsym.c')
-rw-r--r--gdb/buildsym.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index e4dcbdd..fc03378 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -439,23 +439,26 @@ start_subfile (name, dirname)
of any pending subfiles from C to C++. We also accept any other C++
suffixes accepted by deduce_language_from_filename (in particular,
some people use .cxx with cfront). */
+ /* Likewise for f2c. */
if (subfile->name)
{
struct subfile *s;
+ enum language sublang = deduce_language_from_filename (subfile->name);
- if (deduce_language_from_filename (subfile->name) == language_cplus)
+ if (sublang == language_cplus || sublang == language_fortran)
for (s = subfiles; s != NULL; s = s->next)
if (s->language == language_c)
- s->language = language_cplus;
+ s->language = sublang;
}
/* And patch up this file if necessary. */
if (subfile->language == language_c
&& subfile->next != NULL
- && subfile->next->language == language_cplus)
+ && (subfile->next->language == language_cplus
+ || subfile->next->language == language_fortran))
{
- subfile->language = language_cplus;
+ subfile->language = subfile->next->language;
}
}