From: Iain Buclaw Date: Sat, 18 Jan 2014 16:04:36 +0000 (+0000) Subject: Add gdb.dlang to the gdb testsuite for the purpose of creating D X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=7f420862a712047fa2c0031ce42a28861ac43546;p=deliverable%2Fbinutils-gdb.git Add gdb.dlang to the gdb testsuite for the purpose of creating D specific tests. gdb/testsuite/ChangeLog: 2014-01-17 Iain Buclaw * configure.ac: Create gdb.dlang/Makefile. * configure: Regenerate. * Makefile.in (ALL_SUBDIRS): Add gdb.dlang. * gdb.dlang/Makefile.in: New file. * lib/d-support.exp: New file. * lib/gdb.exp (skip_d_tests): New proc. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 6a9d8c0921..a653a81e48 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2014-01-17 Iain Buclaw + + * configure.ac: Create gdb.dlang/Makefile. + * configure: Regenerate. + * Makefile.in (ALL_SUBDIRS): Add gdb.dlang. + * gdb.dlang/Makefile.in: New file. + * lib/d-support.exp: New file. + * lib/gdb.exp (skip_d_tests): New proc. + 2014-01-16 Markus Metzger * gdb.btrace/delta.exp: Check reverse stepi. diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in index 2204a3c4b2..7a44660011 100644 --- a/gdb/testsuite/Makefile.in +++ b/gdb/testsuite/Makefile.in @@ -33,7 +33,7 @@ EXEEXT = @EXEEXT@ SUBDIRS = @subdirs@ RPATH_ENVVAR = @RPATH_ENVVAR@ ALL_SUBDIRS = gdb.ada gdb.arch gdb.asm gdb.base gdb.btrace gdb.cell gdb.cp \ - gdb.disasm gdb.dwarf2 gdb.fortran gdb.gdb gdb.go gdb.hp \ + gdb.disasm gdb.dlang gdb.dwarf2 gdb.fortran gdb.gdb gdb.go gdb.hp \ gdb.java gdb.linespec gdb.mi gdb.modula2 gdb.multi \ gdb.objc gdb.opencl gdb.opt gdb.pascal gdb.python gdb.server \ gdb.stabs gdb.reverse gdb.threads gdb.trace gdb.xml \ diff --git a/gdb/testsuite/configure b/gdb/testsuite/configure index da590f3146..94542a6622 100755 --- a/gdb/testsuite/configure +++ b/gdb/testsuite/configure @@ -3448,7 +3448,7 @@ done -ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile" +ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -4158,6 +4158,7 @@ do "gdb.cp/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.cp/Makefile" ;; "gdb.disasm/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.disasm/Makefile" ;; "gdb.dwarf2/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.dwarf2/Makefile" ;; + "gdb.dlang/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.dlang/Makefile" ;; "gdb.fortran/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.fortran/Makefile" ;; "gdb.go/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.go/Makefile" ;; "gdb.server/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.server/Makefile" ;; diff --git a/gdb/testsuite/configure.ac b/gdb/testsuite/configure.ac index f25b939c81..61d0bff673 100644 --- a/gdb/testsuite/configure.ac +++ b/gdb/testsuite/configure.ac @@ -91,7 +91,8 @@ AC_OUTPUT([Makefile \ gdb.ada/Makefile \ gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile \ gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile \ - gdb.fortran/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile \ + gdb.dlang/Makefile gdb.fortran/Makefile gdb.go/Makefile \ + gdb.server/Makefile gdb.java/Makefile \ gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile \ gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile \ gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile \ diff --git a/gdb/testsuite/gdb.dlang/Makefile.in b/gdb/testsuite/gdb.dlang/Makefile.in new file mode 100644 index 0000000000..5527c3e14f --- /dev/null +++ b/gdb/testsuite/gdb.dlang/Makefile.in @@ -0,0 +1,15 @@ +VPATH = @srcdir@ +srcdir = @srcdir@ + +EXECUTABLES = + +all info install-info dvi install uninstall installcheck check: + @echo "Nothing to be done for $@..." + +clean mostlyclean: + -rm -f *~ *.o *.ci + -rm -f *.dwo *.dwp + -rm -f core ${EXECUTABLES} + +distclean maintainer-clean realclean: clean + -rm -f Makefile config.status config.log gdb.log gdb.sum diff --git a/gdb/testsuite/lib/d-support.exp b/gdb/testsuite/lib/d-support.exp new file mode 100644 index 0000000000..fe867874cc --- /dev/null +++ b/gdb/testsuite/lib/d-support.exp @@ -0,0 +1,34 @@ +# Copyright 2014 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 3 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, see . + +# Auxiliary function to set the language to D. +# The result is 1 (true) for success, 0 (false) for failure. + +proc set_lang_d {} { + if [gdb_test_no_output "set language d"] { + return 0 + } + if [gdb_test "show language" ".* source language is \"d\"." \ + "set language to \"d\""] { + return 0 + } + return 1 +} + +# D version of runto_main. + +proc d_runto_main { } { + return [runto _Dmain] +} diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 8559b59910..37164728a1 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1568,6 +1568,12 @@ proc skip_java_tests {} { return 0 } +# Return a 1 if I don't even want to try to test D. + +proc skip_d_tests {} { + return 0 +} + # Return a 1 for configurations that do not support Python scripting. proc skip_python_tests {} {