From patchwork Wed Jan 14 13:49:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keven Boell X-Patchwork-Id: 4675 Received: (qmail 27266 invoked by alias); 14 Jan 2015 13:50:14 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 26685 invoked by uid 89); 14 Jan 2015 13:49:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD, UNSUBSCRIBE_BODY autolearn=no version=3.3.2 X-HELO: mga14.intel.com Received: from mga14.intel.com (HELO mga14.intel.com) (192.55.52.115) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Jan 2015 13:49:58 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 14 Jan 2015 05:44:33 -0800 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 14 Jan 2015 05:49:47 -0800 Received: from ullecvh004g04.iul.intel.com (ullecvh004g04.iul.intel.com [172.28.50.14]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t0EDnkET007064; Wed, 14 Jan 2015 13:49:47 GMT Received: from ullecvh004g04.iul.intel.com (ullecvh004g04.iul.intel.com [127.0.0.1]) by ullecvh004g04.iul.intel.com (8.13.8/8.13.8) with ESMTP id t0EDnu3w024095; Wed, 14 Jan 2015 14:49:56 +0100 Received: (from kboell@localhost) by ullecvh004g04.iul.intel.com (8.13.8/8.13.8/Submit) id t0EDnu5F024094; Wed, 14 Jan 2015 14:49:56 +0100 From: Keven Boell To: gdb-patches@sourceware.org Cc: Keven Boell Subject: [V4 12/18] test: add archer dynamic other frame test Date: Wed, 14 Jan 2015 14:49:44 +0100 Message-Id: <1421243390-24015-13-git-send-email-keven.boell@intel.com> In-Reply-To: <1421243390-24015-1-git-send-email-keven.boell@intel.com> References: <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 --- .../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 . +! Modified for the GDB testcase by Jan Kratochvil . + +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 . +! Modified for the GDB testcase by Jan Kratochvil . + +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