aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-06-02 23:01:01 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-06-02 23:01:01 +0000
commitfd5700c7c6ec3220529d2164e6dc6bfb35a23146 (patch)
tree7c87213e4c7d53800cfa75acf2ec85b2abdbfa3d
parentf55ee35cf17f1eb104292b4c6b2f7def38ffe4a8 (diff)
downloadgdb-fd5700c7c6ec3220529d2164e6dc6bfb35a23146.zip
gdb-fd5700c7c6ec3220529d2164e6dc6bfb35a23146.tar.gz
gdb-fd5700c7c6ec3220529d2164e6dc6bfb35a23146.tar.bz2
gdb/
* symfile.c (init_filename_language_table): New extensions .for, .FOR, .ftn, .FTN, .fpp, .FPP, .f90, .F90, .f95, .F95, .f03, .F03, .f08 and .F08. gdb/testsuite/ * gdb.fortran/module.exp (stopped language detection): New test.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/symfile.c14
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.fortran/module.exp6
4 files changed, 30 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0e1f80b..dcb8214 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2010-06-02 Jan Kratochvil <jan.kratochvil@redhat.com>
+ * symfile.c (init_filename_language_table): New extensions .for, .FOR,
+ .ftn, .FTN, .fpp, .FPP, .f90, .F90, .f95, .F95, .f03, .F03, .f08 and
+ .F08.
+
+2010-06-02 Jan Kratochvil <jan.kratochvil@redhat.com>
+
Support DW_TAG_module as separate namespaces.
* dwarf2read.c (typename_concat): New parameter physname.
(read_module_type): New function and declaration.
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 1d7d53d..ab51fa4 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2633,6 +2633,20 @@ init_filename_language_table (void)
add_filename_language (".m", language_objc);
add_filename_language (".f", language_fortran);
add_filename_language (".F", language_fortran);
+ add_filename_language (".for", language_fortran);
+ add_filename_language (".FOR", language_fortran);
+ add_filename_language (".ftn", language_fortran);
+ add_filename_language (".FTN", language_fortran);
+ add_filename_language (".fpp", language_fortran);
+ add_filename_language (".FPP", language_fortran);
+ add_filename_language (".f90", language_fortran);
+ add_filename_language (".F90", language_fortran);
+ add_filename_language (".f95", language_fortran);
+ add_filename_language (".F95", language_fortran);
+ add_filename_language (".f03", language_fortran);
+ add_filename_language (".F03", language_fortran);
+ add_filename_language (".f08", language_fortran);
+ add_filename_language (".F08", language_fortran);
add_filename_language (".s", language_asm);
add_filename_language (".sx", language_asm);
add_filename_language (".S", language_asm);
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index ccd211c..d6b2640 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2010-06-02 Jan Kratochvil <jan.kratochvil@redhat.com>
+ * gdb.fortran/module.exp (stopped language detection): New test.
+
+2010-06-02 Jan Kratochvil <jan.kratochvil@redhat.com>
+
Support DW_TAG_module as separate namespaces.
* gdb.fortran/library-module.exp, gdb.fortran/library-module-main.f90,
gdb.fortran/library-module-lib.f90: New.
diff --git a/gdb/testsuite/gdb.fortran/module.exp b/gdb/testsuite/gdb.fortran/module.exp
index 4042b26..fabf660 100644
--- a/gdb/testsuite/gdb.fortran/module.exp
+++ b/gdb/testsuite/gdb.fortran/module.exp
@@ -20,6 +20,12 @@ if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77}] } {
return -1
}
+# Test automatic language detection before the inferior starts. It tests the
+# effect of expected:
+# (gdb) show language
+# The current source language is "auto; currently fortran".
+gdb_test "p modmany::var_i" " = 14" "stopped language detection"
+
if ![runto MAIN__] then {
perror "couldn't run to breakpoint MAIN__"
continue