Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Subject: [patch] Extend Fortran detection filename extensions
Date: Wed, 02 Jun 2010 21:41:00 -0000	[thread overview]
Message-ID: <20100602214059.GB30562@host0.dyn.jankratochvil.net> (raw)

Hi,

this patch would not need to be but it was made on top of pending
	Re: [patch 3/3] Fortran modules namespaces [rediff]
	http://sourceware.org/ml/gdb-patches/2010-06/msg00059.html

I found out before I start the inferior GDB still claims:
(gdb) show language 
The current source language is "auto; currently c".

Therefore I extended the filename extensions table from that found in gcc HEAD
gcc/gcc.c:default_compilers[].

No regressions on {x86_64,x86_64-m32,i686}-fedora13-linux-gnu.


Thanks,
Jan


gdb/
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.

gdb/testsuite/
2010-06-02  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.fortran/module.exp (stopped language detection): New test.

--- 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);
--- a/gdb/testsuite/gdb.fortran/module.exp
+++ b/gdb/testsuite/gdb.fortran/module.exp
@@ -20,6 +20,9 @@ if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77}] } {
     return -1
 }
 
+# Test automatic language detection before the inferior starts.
+gdb_test "p modmany::var_i" " = 14" "stopped language detection"
+
 if ![runto MAIN__] then {
     perror "couldn't run to breakpoint MAIN__"
     continue


             reply	other threads:[~2010-06-02 21:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-02 21:41 Jan Kratochvil [this message]
2010-06-02 22:03 ` Tom Tromey
2010-06-02 23:03   ` Jan Kratochvil
2010-06-02 22:06 ` Joel Brobecker
2010-06-02 22:37   ` Jan Kratochvil
2010-06-02 22:52     ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100602214059.GB30562@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox