8sa1-binutils-gdb/gdb/testsuite/lib
Simon Marchi 6cf66e763a gdb/testsuite: add inferior arguments test
Add a test for verifying different methods of passing arguments to the
inferior: the start, starti and run commands, as well as `set args`.

All these methods work naturally when using the unix or
native-extended-gdbserver target boards.  Since those are non-stub
boards, GDB runs new inferiors and therefore pass arguments to them.
With target boards where GDB connects to a stub, for example with
native-gdbserver, they don't really make sense.  The inferior process is
already started when GDB connects.

However, the "run" method is still tested with stub targets, because the
gdb_run_cmd procedure is adapted for stub targets.  Instead of issuing
the `run` command, it spawns whatever program is supposed to bring up
the stub (gdbserver, for example) using gdb_reload and makes GDB connect
to it.  So this allows us to exercise argument passing through the
gdbserver command line, when testing with the native-gdbserver board.

Note that there is already a gdb.base/args.exp, but this tests
specifically the --args switch of GDB.  Perhaps it could be integrated
in this new test, as a new "method".

gdb/testsuite/ChangeLog:

	* lib/gdb.exp (gdb_run_cmd): Return success or failure.
	* gdb.base/inferior-args.exp: New file.
	* gdb.base/inferior-args.c: New file.

Change-Id: Ib61ea6220a47f9f67aed2960dcacd240cb57af70
2020-05-25 11:40:36 -04:00
..
ada.exp [gdb/testsuite] Fix gdb.ada/catch_ex_std.exp gnatlink FAIL 2020-04-13 18:53:14 +02:00
append_gdb_boards_dir.exp
build-piece.exp
cache.exp
check-test-names.exp gdb/testsuite: Revert commit 843f4d9357 2020-05-15 11:48:57 +01:00
cl_util.c
cl_util.h
compile-support.exp
compiler.c
compiler.cc
completion-support.exp
cp-support.exp
d-support.exp
data-structures.exp
dtrace.exp
dwarf.exp gdb/testsuite: Move helper function into lib/dwarf.exp 2020-04-14 12:13:06 +01:00
fortran.exp gdb/fortran: Allow Flang MAIN_ in Fortran testing 2020-05-11 00:48:10 +05:30
future.exp
gdb-guile.exp
gdb-python.exp
gdb-utils.exp Revert "Add completion styling" 2020-05-24 20:27:48 -06:00
gdb.exp gdb/testsuite: add inferior arguments test 2020-05-25 11:40:36 -04:00
gdbserver-support.exp
gen-perf-test.exp
gnat_debug_info_test.adb
go.exp
jit-elf-helpers.exp [gdb/testsuite] Fix var use in compile_and_download_n_jit_so 2020-05-25 12:28:54 +02:00
memory.exp
mi-support.exp
objc.exp
opencl_hostapp.c
opencl_kernel.cl
opencl.exp
pascal.exp
pdtrace.in
perftest.exp
prelink-support.exp
prompt.exp
range-stepping-support.exp
read1.c
rust-support.exp
selftest-support.exp
set_unbuffered_mode.c
sym-info-cmds.exp
trace-support.exp
tuiterm.exp
unbuffer_output.c [gdb/testsuite] Fix gdb_unbuffer_output return-type 2020-05-06 09:41:26 +02:00
valgrind.exp