From fd5700c7c6ec3220529d2164e6dc6bfb35a23146 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Wed, 2 Jun 2010 23:01:01 +0000 Subject: [PATCH] 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. --- gdb/ChangeLog | 6 ++++++ gdb/symfile.c | 14 ++++++++++++++ gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.fortran/module.exp | 6 ++++++ 4 files changed, 30 insertions(+) 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 + * 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 + 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 + * gdb.fortran/module.exp (stopped language detection): New test. + +2010-06-02 Jan Kratochvil + 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 -- 2.7.4