public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Keven Boell <keven.boell@intel.com>
To: gdb-patches@sourceware.org
Cc: Keven Boell <keven.boell@intel.com>
Subject: [V4 12/18] test: add archer dynamic other frame test
Date: Wed, 14 Jan 2015 13:50:00 -0000	[thread overview]
Message-ID: <1421243390-24015-13-git-send-email-keven.boell@intel.com> (raw)
In-Reply-To: <1421243390-24015-1-git-send-email-keven.boell@intel.com>

Add dynamic other frame test written by Jan
Kratochvil.

testsuite/gdb.fortran/:

	* dynamic-other-frame-stub.f90: New file.
	* dynamic-other-frame.exp: New file.
	* dynamic-other-frame.f90: New file.



Signed-off-by: Keven Boell <keven.boell@intel.com>
---
 .../gdb.fortran/dynamic-other-frame-stub.f90       |   24 ++++++++++++
 gdb/testsuite/gdb.fortran/dynamic-other-frame.exp  |   39 ++++++++++++++++++++
 gdb/testsuite/gdb.fortran/dynamic-other-frame.f90  |   36 ++++++++++++++++++
 3 files changed, 99 insertions(+)
 create mode 100644 gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
 create mode 100644 gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
 create mode 100644 gdb/testsuite/gdb.fortran/dynamic-other-frame.f90

diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 b/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
new file mode 100644
index 0000000..f9286cd
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
@@ -0,0 +1,24 @@
+! Copyright 2015 Free Software Foundation, Inc.
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program; if not, write to the Free Software
+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+!
+! Ihis file is the Fortran source file for dynamic.exp.
+! Original file written by Jakub Jelinek <jakub@redhat.com>.
+! Modified for the GDB testcase by Jan Kratochvil <jan.kratochvil@redhat.com>.
+
+subroutine bar
+  real :: dummy
+  dummy = 1
+end subroutine bar
diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp b/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
new file mode 100644
index 0000000..16227bb
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
@@ -0,0 +1,39 @@
+# Copyright 2015 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+
+set testfile "dynamic-other-frame"
+set srcfile1 ${testfile}.f90
+set srcfile2 ${testfile}-stub.f90
+set objfile2 [standard_output_file ${testfile}-stub.o]
+set executable ${testfile}
+set binfile [standard_output_file ${executable}]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${objfile2}" object {f90}] != ""
+     || [gdb_compile "${srcdir}/${subdir}/${srcfile1} ${objfile2}" "${binfile}" executable {debug f90}] != "" } {
+    untested "Couldn't compile ${srcfile1} or ${srcfile2}"
+    return -1
+}
+
+clean_restart ${executable}
+
+gdb_test_no_output "set print frame-arguments all"
+
+if ![runto bar_] then {
+    perror "couldn't run to bar_"
+    continue
+}
+
+gdb_test "bt" {foo \(string='hello'.*}
diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 b/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
new file mode 100644
index 0000000..7ff3eda
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
@@ -0,0 +1,36 @@
+! Copyright 2015 Free Software Foundation, Inc.
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program; if not, write to the Free Software
+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+!
+! Ihis file is the Fortran source file for dynamic.exp.
+! Original file written by Jakub Jelinek <jakub@redhat.com>.
+! Modified for the GDB testcase by Jan Kratochvil <jan.kratochvil@redhat.com>.
+
+subroutine foo (string)
+  interface
+    subroutine bar
+    end subroutine
+  end interface
+  character string*(*)
+  call bar                                ! stop-here
+end subroutine foo
+program test
+  interface
+    subroutine foo (string)
+    character string*(*)
+    end subroutine
+  end interface
+  call foo ('hello')
+end
-- 
1.7.9.5

  parent reply	other threads:[~2015-01-14 13:50 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-14 13:49 [V4 00/21] Fortran dynamic array support Keven Boell
2015-01-14 13:49 ` [V4 01/18] vla: introduce allocated/associated flags Keven Boell
2015-02-09  6:52   ` Joel Brobecker
2015-02-09 23:37     ` Doug Evans
2015-02-11  8:44       ` Joel Brobecker
2015-02-11 17:36         ` Doug Evans
2015-02-18 15:54     ` Keven Boell
2015-01-14 13:49 ` [V4 04/18] test: evaluate dynamic arrays using Fortran primitives Keven Boell
2015-01-14 13:49 ` [V4 07/18] test: evaluating allocation/association status Keven Boell
2015-01-14 13:50 ` [V4 08/18] test: dynamic arrays passed to functions Keven Boell
2015-01-14 13:50 ` [V4 05/18] test: dynamic arrays passed to subroutines Keven Boell
2015-01-14 13:50 ` [V4 10/18] test: basic MI test for the dynamic array support Keven Boell
2015-01-14 13:50 ` [V4 14/18] vla: use value constructor instead of raw-buffer manipulation Keven Boell
2015-01-14 13:50 ` Keven Boell [this message]
2015-01-14 13:50 ` [V4 17/18] vla: add stride support to fortran arrays Keven Boell
2015-01-14 13:50 ` [V4 16/18] vla: Fortran dynamic string support Keven Boell
2015-01-14 13:50 ` [V4 18/18] vla: add NEWS entry for dynamic array support Keven Boell
2015-01-14 18:01   ` Eli Zaretskii
2015-01-14 13:50 ` [V4 03/18] test: basic tests for dynamic array evaluations in Fortran Keven Boell
2015-01-14 13:50 ` [V4 02/18] vla: make dynamic fortran arrays functional Keven Boell
2015-02-09  7:09   ` Joel Brobecker
2015-02-18 16:02     ` Keven Boell
2015-02-22  4:23       ` Joel Brobecker
2015-01-14 13:50 ` [V4 13/18] vla: reconstruct value to compute bounds of target type Keven Boell
2015-01-14 13:50 ` [V4 09/18] test: accessing dynamic array history values Keven Boell
2015-01-14 13:50 ` [V4 15/18] vla: get dynamic array corner cases to work Keven Boell
2015-01-14 13:50 ` [V4 06/18] test: correct ptype of dynamic arrays in Fortran Keven Boell
2015-01-14 13:50 ` [V4 11/18] test: test sizeof for dynamic fortran arrays Keven Boell
2015-05-28 20:36 ` [V4 00/21] Fortran dynamic array support Jan Kratochvil
2015-05-28 20:52   ` Joel Brobecker
2015-06-14  8:15 ` Jan Kratochvil
2015-06-17 11:42   ` Boell, Keven
2015-07-01 12:43     ` Keven Boell
2016-07-07  8:30 ` Jan Kratochvil
2016-07-07  9:16   ` Bernhard Heckel
2016-07-07  9:23     ` Jan Kratochvil

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=1421243390-24015-13-git-send-email-keven.boell@intel.com \
    --to=keven.boell@intel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).