Remove MULTI_OBJFILE_P
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.ada / sym_print_name.exp
index 6f51e1207ed221517e30aac94f68250c52c9b755..430b78af05f53feb1a51c0dffcb89d43855768af 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright 2008-2019 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
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if $tracelevel then {
-    strace $tracelevel
-}
-
 load_lib "ada.exp"
 
-set testdir "sym_print_name"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
 
-# A convenience function that joins all the arguments together,
-# with a regexp that matches zero-or-more end of lines in between
-# each argument.  This function is ideal to write the expected output
-# of a GDB command that generates more than a couple of lines, as
-# this allows us to write each line as a separate string, which is
-# easier to read by a human being.
-
-proc multi_line { args } {
-    return [join $args "\[\r\n\]*"]
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${testfile}
 
 set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
 runto "foo.adb:$bp_location"
 
-set menu [multi_line "Multiple matches for i" \
+set menu [multi_line "Multiple matches for integervar" \
                      "\\\[0\\\] cancel" \
-                     "\\\[1\\\] pck\\.first\\.i.*" \
-                     "\\\[2\\\] pck\\.second\\.i.*" \
+                     "\\\[1\\\] pck\\.first\\.integervar.*" \
+                     "\\\[2\\\] pck\\.second\\.integervar.*" \
                      "> $" ]
 
-set test_name "multiple matches for symbol i"
-gdb_test_multiple "print i" "$test_name" \
+set test_name "multiple matches for symbol integervar"
+gdb_test_multiple "print integervar" "$test_name" \
 {
       -re "$menu" {
           pass "$test_name"
This page took 0.02775 seconds and 4 git commands to generate.