This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Extend Fortran detection filename extensions


On Thu, 03 Jun 2010 00:03:14 +0200, Tom Tromey wrote:
> This is ok.

On Thu, 03 Jun 2010 00:52:41 +0200, Joel Brobecker wrote:
> if adjust the comment to say that this *also* verifies that the language
> is currently fortran, since the test itself seems to be important as well.

I hope the extended comment is acceptable.

Checked-in.


Thanks,
Jan


http://sourceware.org/ml/gdb-cvs/2010-06/msg00028.html

--- src/gdb/ChangeLog	2010/06/02 22:41:55	1.11867
+++ src/gdb/ChangeLog	2010/06/02 23:01:00	1.11868
@@ -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.
--- src/gdb/testsuite/ChangeLog	2010/06/02 22:41:56	1.2310
+++ src/gdb/testsuite/ChangeLog	2010/06/02 23:01:01	1.2311
@@ -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.
--- src/gdb/symfile.c	2010/05/16 23:49:58	1.287
+++ src/gdb/symfile.c	2010/06/02 23:01:00	1.288
@@ -2633,6 +2633,20 @@
       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);
--- src/gdb/testsuite/gdb.fortran/module.exp	2010/06/02 22:41:56	1.3
+++ src/gdb/testsuite/gdb.fortran/module.exp	2010/06/02 23:01:01	1.4
@@ -20,6 +20,12 @@
     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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]