[gdb/testsuite] Remove more uses of "eval"

Remove some more uses of the Tcl "eval" proc.

In most cases the {*} "splat" expansion is used instead.

The exceptions are:
- gdb.base/inferior-args.exp where we rewrite:
    set cmd [format "lappend item \{ '%c' '\\%c' \}" 34 34]
    eval $cmd
  into:
    lappend item [format { '%c' '\%c' } 34 34]
- reset_vars in lib/check-test-names.exp where we simply drop an unnecessary
  eval

Tested on x86_64-linux.

Approved-By: Tom Tromey <tom@tromey.com>
diff --git a/gdb/testsuite/gdb.base/inferior-args.exp b/gdb/testsuite/gdb.base/inferior-args.exp
index b2916701..6b92c08 100644
--- a/gdb/testsuite/gdb.base/inferior-args.exp
+++ b/gdb/testsuite/gdb.base/inferior-args.exp
@@ -170,8 +170,7 @@
 # the rest of this mess in order to avoid TCL escaping the quote for
 # me.  It's super important that what we send to GDB is '"' not '\"'.
 set item [list "test two" false]
-set cmd [format "lappend item \{ '%c' '\\%c' \}" 34 34]
-eval $cmd
+lappend item [format { '%c' '\%c' } 34 34]
 set bs "\\\\"
 lappend item [list "$hex \"$bs\"\"" "$hex \"$bs$bs$bs\"\""]
 lappend test_desc_list $item
diff --git a/gdb/testsuite/gdb.dwarf2/clztest.exp b/gdb/testsuite/gdb.dwarf2/clztest.exp
index 7a74e02..93c2ced 100644
--- a/gdb/testsuite/gdb.dwarf2/clztest.exp
+++ b/gdb/testsuite/gdb.dwarf2/clztest.exp
@@ -61,7 +61,7 @@
 	    continue
 	}
 
-	eval $test_cmd
+	{*}$test_cmd
     }
     close $fd
 }
diff --git a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
index 1135709..b80ce97 100644
--- a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
+++ b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
@@ -78,7 +78,7 @@
 	    continue
 	}
 
-	eval $test_cmd
+	{*}$test_cmd
     }
     close $fd
 }
diff --git a/gdb/testsuite/lib/check-test-names.exp b/gdb/testsuite/lib/check-test-names.exp
index 049addd..d099ffc 100644
--- a/gdb/testsuite/lib/check-test-names.exp
+++ b/gdb/testsuite/lib/check-test-names.exp
@@ -146,7 +146,7 @@
 
 	# If ARGS is the empty list then we don't want to pass a single
 	# empty string as a parameter here.
-	eval "CheckTestNames::log_summary $args"
+	CheckTestNames::log_summary {*}$args
 
 	if { [llength $args] == 0 } {
 	    set which "count"
@@ -184,10 +184,10 @@
 
 # Create new global log_summary to replace Dejagnu's.
 proc log_summary { args } {
-    eval "CheckTestNames::do_log_summary $args"
+    CheckTestNames::do_log_summary {*}$args
 }
 
 # Create new global reset_vars to replace Dejagnu's.
 proc reset_vars {} {
-    eval "CheckTestNames::do_reset_vars"
+    CheckTestNames::do_reset_vars
 }
diff --git a/gdb/testsuite/lib/debuginfod-support.exp b/gdb/testsuite/lib/debuginfod-support.exp
index 674888a..7a8baf4 100644
--- a/gdb/testsuite/lib/debuginfod-support.exp
+++ b/gdb/testsuite/lib/debuginfod-support.exp
@@ -37,7 +37,7 @@
     # (installed by ASan) exist on startup.  That makes TCL's exec throw an
     # error.  This is dealt with by the --quiet in INTERNAL_GDBFLAGS.
     if { [string first "with-debuginfod" \
-	      [eval exec $::GDB $::INTERNAL_GDBFLAGS \
+	      [exec $::GDB {*}$::INTERNAL_GDBFLAGS \
 		   --configuration]] == -1 } {
 	return false
     }
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 1780e37..36bd3b4 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -5749,7 +5749,7 @@
 	set ifile $tofile
 	set cppout [ gdb_compile "${ifile}" "" preprocess [list "$language" quiet getting_compiler_info] ]
     }
-    eval log_file $saved_log
+    log_file {*}$saved_log
 
     # Eval the output.
     set unknown 0
@@ -7986,12 +7986,12 @@
 
 proc make_gdb_parallel_path { args } {
     global GDB_PARALLEL objdir
-    set joiner [list "file" "join" $objdir]
+    set joiner [list $objdir]
     if { [info exists GDB_PARALLEL] && $GDB_PARALLEL != "yes" } {
 	lappend joiner $GDB_PARALLEL
     }
     set joiner [concat $joiner $args]
-    return [eval $joiner]
+    return [file join {*}$joiner]
 }
 
 # Turn BASENAME into a full file name in the standard output