aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-05-09 11:01:07 +0800
committerYao Qi <yao@codesourcery.com>2014-05-20 14:01:51 +0800
commit73c9764f95f3a06a11948c0a88dacc6e3ebcb660 (patch)
treeaf9522b8b597556dd77d312b31da9ce63b64f4bd /libiberty
parentf2205de0080d999c9b67872c9db471c31b53e378 (diff)
downloadgdb-73c9764f95f3a06a11948c0a88dacc6e3ebcb660.zip
gdb-73c9764f95f3a06a11948c0a88dacc6e3ebcb660.tar.gz
gdb-73c9764f95f3a06a11948c0a88dacc6e3ebcb660.tar.bz2
gdb_init argument ARGS is a string rather than a list
The argument ARGS of gdb_init is passed from dejagnu is a string, the test file name. In dejagnu/runtest.exp: proc runtest { test_file_name } { .... .... if [info exists tool] { if { [info procs "${tool}_init"] != "" } { ${tool}_init $test_file_name; } } .... } but inn default_gdb_init (callee of gdb_init), we have set gdb_test_file_name [file rootname [file tail [lindex $args 0]]] In tcl, all actual arguments are combined to a list and assigned to args. This code here isn't wrong, but unnecessary, because its caller (proc runtest) only passes one string to it, and IMO, we don't need such tricky tcl "args". I doubt that "[lindex $args 0]" is to be backward compatible with old dejagnu, but dejagnu-1.4 release started to pass $test_file_name to ${too}_init, as I showed above. dejagnu-1.4 was released in 2001, and it should be old enough. I also tried to check whether gdb testusite works with dejagnu-1.3 or not, but failed to build dejagnu-1.3 on my machine. Supposing GDB testsuite requires at least dejagnu-1.4, this change should be safe. This patch is update default_gdb_init to treat ARGS as a string instead of a list. Then, 'args' sounds like a list, and this patch also renames it by 'test_file_name', to align with dejagnu. gdb/testsuite: 2014-05-20 Yao Qi <yao@codesourcery.com> * lib/gdb.exp (default_gdb_init): Rename argument 'args' by 'test_file_name'. Treat args as a string instead of a list. (gdb_init): Rename argument 'args' by 'test_file_name'.
Diffstat (limited to 'libiberty')
0 files changed, 0 insertions, 0 deletions