Commit Graph

233 Commits

Author SHA1 Message Date
Simon Marchi 75d0451240 gdb/testsuite: support passing inferior arguments with native-gdbserver board
This patch makes it possible to run tests requiring passing arguments to
the inferior with the native-gdbserver board.  The end goal is to write
a test that verifies passing arguments to the inferior works, and to
have that test exercise inferior arguments passed on the gdbserver
command line, when using the native-gdbserver target board (in addition
to the other boards).  This is done in the next patch.

With the native-gdbserver target board, gdbserver is started in
gdb_reload (implemented in config/gdbserver.exp), called in gdb_run_cmd.
gdb_run_cmd already supposedly accepts inferior arguments (although that
feature does not seem to be used anywhere), which it passes to the `run`
command, for non-stub target boards.  I've changed gdb_run_cmd so that
it forwards these arguments to gdb_reload as well.  gdb_reload passes
them to gdbserver_run, and they eventually make their way to the
gdbserver command line.

gdb_run_cmd currently accepts `args` (the varargs of tcl), which means
it receives inferior arguments as a list.  This won't work with
arguments with spaces, because they will end up being formatted with
curly braces like this:

    % set args [list hello "with spaces" world]
    hello {with spaces} world
    % puts "run $args"
    run hello {with spaces} world

I've changed it to accept a single string that is passed to `run` and
gdb_reload.  I've done the same change in gdb_start_cmd and
gdb_starti_cmd, although these two are not used with native-gdbserver.

I've changed all gdb_reload implementations in the tree to accept a new
inferior_args argument, although most of them don't do anything with it
(and don't need to).  People maintaining target boards out of tree will
need to do the same.

I found two tests to adjust to avoid adding new failures or errors.
These tests needed new [use_gdb_stub] checks, because they rely on
having GDB run new processes.  These are guarded by a [target_info
exists noargs], which made them get skipped on native-gdbserver.  But
now that the native-gdbserver board supports args, this is no longer
enough.

Note that with this change, noargs and use_gdb_stub are orthogonal.  It
took me a moment to grasp this, so I thought I would spell out the
different possible situations:

- !noargs and !use_gdb_stub: inferior process started by gdb, can pass
  args
- noargs and !use_gdb_stub: inferior process started by gdb (perhaps
  through extended-remote protocol, the simulator, some other target),
  but that target doesn't support inferior arguments
- noargs and use_gdb_stub: inferior process started by some other
  program to which GDB connects using the remote protocol, that program
  does not support passing args to the inferior process
- !noargs and use_gdb_stub: inferior process started by some other
  program to which GDB connects u sing the remote protocol, that program
  supports passing args to the inferior process

gdb/testsuite/ChangeLog:

	* lib/gdb.exp (gdb_run_cmd): Change argument from args to
	inferior_args.  Pass it to gdb_reload.
	(gdb_start_cmd, gdb_starti_cmd): Change argument from args to
	inferior_args.
	(gdb_reload): Add inferior_args argument.
	* config/gdbserver.exp (gdb_reload): Add inferior_args argument,
	pass it to gdbserver_run.
	* boards/native-gdbserver.exp: Do not set noargs.
	* boards/native-extended-gdbserver.exp (gdb_reload): Add
	inferior_args argument.
	* boards/stdio-gdbserver-base.exp (gdb_reload): Likewise.
	* gdb.base/a2-run.exp: Check for use_gdb_stub.
	* gdb.base/args.exp: Likewise.

Change-Id: Ibda027c71867157852f34700342ab31edf39e4d8
2020-05-25 11:40:36 -04:00
Tom de Vries 3608f86c42 [gdb/testsuite] Remove unused globals
Remove unused global variable declarations.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-02-27  Tom de Vries  <tdevries@suse.de>

	* config/sid.exp: Remove unused globals.
	* gdb.base/attach.exp: Same.
	* gdb.base/catch-load.exp: Same.
	* gdb.base/dbx.exp: Same.
	* lib/gdb.exp: Same.
	* lib/mi-support.exp: Same.
	* lib/prompt.exp: Same.
2020-02-27 14:27:09 +01:00
Joel Brobecker b811d2c292 Update copyright year range in all GDB files.
gdb/ChangeLog:

        Update copyright year range in all GDB files.
2020-01-01 10:20:53 +04:00
Andrew Burgess 7cde5fc2ec gdb/testsuite: Prepare for DejaGnu 1.6.2
Changes in DejaGnu 1.6.2 mean that our testsuite will no longer run.
This is because of some confusion over how the gdb.exp file is
handled.

The gdb.exp file is really the tool init file, which is loaded from
within the DejaGnu core, and it should not be loaded directly from any
other file in the testsuite.

DejaGnu tries to prevent the same library being loaded twice by
remembering the names of library files as they are loaded.  Until
recently loading the tool init file in DejaGnu was very similar to
loading a library file, as a result, loading the gdb.exp tool init
file simply recorded 'gdb.exp' as having been loaded, future attempts
to load 'gdb.exp' as a library would then be ignored (as the file was
marked as already loaded).

DejaGnu has now changed so that it supports having both a tool init
file and a library with the same name, something that was not possible
before.  What this means however is that when the core loads the
'gdb.exp' tool init file it no longer marks the library 'gdb.exp' as
having been loaded.  When we then execute 'load_lib gdb.exp' we then
try to reload the 'gdb.exp' file.

Unfortunately our gdb.exp file can only be loaded once.  It use of
'rename cd builtin_cd' means that a second attempt to load this file
will fail.

This was discussed on the DejaGnu list here:
   http://lists.gnu.org/archive/html/dejagnu/2019-03/msg00000.html

and the suggested advice is that, unless we have some real requirement
to load the tool init file twice, we should remove calls to 'load_lib
gdb.exp' and rely on DejaGnu to load the file for us, which is what
this patch does.

I've tested with native X86-64/GNU Linux and see no regressions.

gdb/testsuite/ChangeLog:

	* config/default.exp: Remove 'load_lib gdb.exp'.
	* config/monitor.exp: Likewise.
	* config/sid.exp: Likewise.
	* config/sim.exp: Likewise.
	* config/slite.exp: Likewise.
	* config/unix.exp: Likewise.
	* gdb.base/default.exp: Remove unhelpful comment.
2019-03-12 19:50:43 +00:00
Joel Brobecker 42a4f53d2b Update copyright year range in all GDB files.
This commit applies all changes made after running the gdb/copyright.py
script.

Note that one file was flagged by the script, due to an invalid
copyright header
(gdb/unittests/basic_string_view/element_access/char/empty.cc).
As the file was copied from GCC's libstdc++-v3 testsuite, this commit
leaves this file untouched for the time being; a patch to fix the header
was sent to gcc-patches first.

gdb/ChangeLog:

	Update copyright year range in all GDB files.
2019-01-01 10:01:51 +04:00
Andrew Burgess 13f2ed32e1 gdb/testsuite/sim: Remove redundant setting of timeout
In the config/sim.exp file two functions are defined.  Both of these
functions define local timeout variables and then call gdb_expect,
which (through a call to get_largest_timeout) will find the local
definition of timeout.

However, both of these functions set the local timeout to some
arbitrary value and print a log message for this "new" timeout just
before returning.

As in both cases, the timeout is a local variable, this final setting
of the timeout has no effect and can be removed.

As having log messages about the timeout being adjusted could cause
confusion I've removed all logging related to timeouts in this
function, timeouts are adjusted throughout the testsuite without any
logging, there doesn't seem to be any good reason why these functions
should get their own logging.

With the logging gone there seems to be little need to a local timeout
variable at all, and so I've folded the local timeout directly into
the call to gdb_expect.

gdb/testsuite/ChangeLog:

	* config/sim.exp (gdb_target_sim): Remove redundant adjustment of
	local timeout variable before return, and remove all local timeout
	variable entirely.
	(gdb_load): Likewise.
2018-12-05 11:53:28 +00:00
Andrew Burgess f721678315 gdb/testsuite: Remove use of dejagnu cleanup proc
The 'cleanup' proc has been removed from dejagnu (Feb 15 2016).  The
proc has not done anything useful since at least 2001 so removing
these calls should be harmless.

gdb/testsuite/ChangeLog:

	* config/sid.exp (gdb_target_sid): Remove use of cleanup.
	* config/sim.exp (gdb_target_sim): Remove use of cleanup.
2018-02-03 16:56:04 +00:00
Joel Brobecker e2882c8578 Update copyright year range in all GDB files
gdb/ChangeLog:

        Update copyright year range in all GDB files
2018-01-02 07:38:06 +04:00
Joel Brobecker 61baf725ec update copyright year range in GDB files
This applies the second part of GDB's End of Year Procedure, which
updates the copyright year range in all of GDB's files.

gdb/ChangeLog:

        Update copyright year range in all GDB files.
2017-01-01 10:52:34 +04:00
Joel Brobecker 618f726fcb GDB copyright headers update after running GDB's copyright.py script.
gdb/ChangeLog:

        Update year range in copyright notice of all files.
2016-01-01 08:43:22 +04:00
Pedro Alves 0ebbc52bee gdb/testsuite/: garbage collect a few references to dead targets
gdb/testsuite/ChangeLog:
2015-08-24  Pedro Alves  <palves@redhat.com>

	* config/m32r-stub.exp: Remove file.
	* gdb.base/call-ar-st.exp: Remove reference to sparclet.
	* gdb.base/call-rt-st.exp: Likewise.
	* gdb.base/call-strs.exp: Likewise.
	* gdb.base/default.exp: Remove references to h8300-*-hms and
	*-*-udi*.
	* gdb.base/funcargs.exp: Remove reference to sparclet-*-*.
2015-08-24 15:53:00 +01:00
Joel Brobecker 32d0add0a6 Update year range in copyright notice of all files owned by the GDB project.
gdb/ChangeLog:

        Update year range in copyright notice of all files.
2015-01-01 13:32:14 +04:00
Pedro Alves 428b16bd5a Remove support for testing against dead "target vxworks"
"target vxworks" and friends have been removed 10 years ago already:

 commit e84ecc995d
 Author:     Andrew Cagney <cagney@redhat.com>
 AuthorDate: Sat Nov 13 23:10:02 2004 +0000

    2004-11-13  Andrew Cagney  <cagney@gnu.org>

        * configure.tgt: Delete i[34567]86-*-vxworks*, m68*-netx-*,
        m68*-*-vxworks*, mips*-*-vxworks*, powerpc-*-vxworks*, and
        sparc-*-vxworks*.
        * NEWS: Mention that vxworks was deleted.
	(...)
        * remote-vxmips.c, remote-vx.c: Delete.
        * remote-vx68.c: Delete.
	(...)

This removes related leftover cruft from the testsuite.

Tested on x86_64 Fedora 20, native and gdbserver.

gdb/testsuite/
2014-09-16  Pedro Alves  <palves@redhat.com>

	* config/vx.exp, config/vxworks.exp, config/vxworks29k.exp: Delete
	files.
	* gdb.base/a2-run.exp: Remove all code guarded by istarget
	"*-*-vxworks*" throughout.
	* gdb.base/break.exp: Likewise.
	* gdb.base/default.exp: Likewise.
	* gdb.base/scope.exp: Likewise.
	* gdb.base/sepdebug.exp: Likewise.
	* gdb.base/break.c: Remove all code guarded by #ifdef vxworks
	throughout.
	* gdb.base/run.c: Likewise.
	* gdb.base/sepdebug.c: Likewise.
	* gdb.hp/gdb.aCC/run.c: Likewise.
	* gdb.reverse/until-reverse.c: Likewise.
	* lib/gdb.exp (gdb_compile): Remove is_vxworks branch.
2014-09-16 12:37:03 +01:00
Joel Brobecker 7f3c034326 Remove "set/show remotebaud" (deprecated) commands.
This patch removes support for the "set/show remotebaud" command,
which were deprecated in GDB 7.7, and should be now be removed
ahead of cutting the GDB 7.8 branch.

gdb/ChangeLog:

        * serial.c (_initialize_serial): Remove support for
        the "set remotebaud" and "show remotebaud" commands.
        * NEWS: Add entry documenting the removal of that command.

gdb/testsuite/ChangeLog:

        * config/monitor.exp (gdb_target_monitor): Replace use of
        "set remotebaud" by "set serial baud".
2014-05-28 12:58:59 -07:00
Joel Brobecker ecd75fc8ee Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
Pedro Alves 4ec7020176 Remove superfluous semicolons from testsuite throughout.
A few months ago semicolons after "return" were removed throughout the
testsuite.  However, as I pointed out in review, they're unnecessary
not just after "return", but pretty much after any tcl command.  ';'
is the command separator, and you only need it if there's another
command on the same line afterwards.

This patch was written by running:

 $ find . -name "*.exp" | xargs grep -l ";\s*$" | xargs sed -i 's/\([^#][^\s*;]*\)\s*;\s*$/\1/'

and then undoing changes to comments, and lib/future.exp.

Tested on x86_64 Fedora 17.

gdb/testsuite/
2013-06-07  Pedro Alves  <palves@redhat.com>

	* boards/native-extended-gdbserver.exp: Remove semicolon.
	* config/arm-ice.exp: Likewise.
	* config/bfin.exp: Likewise.
	* config/cygmon.exp: Likewise.
	* config/h8300.exp: Likewise.
	* config/monitor.exp: Likewise.
	* config/sid.exp: Likewise.
	* config/sim.exp: Likewise.
	* config/slite.exp: Likewise.
	* config/vx.exp: Likewise.
	* gdb.arch/i386-bp_permanent.exp: Likewise.
	* gdb.asm/asm-source.exp: Likewise.
	* gdb.base/args.exp: Likewise.
	* gdb.base/attach-pie-misread.exp: Likewise.
	* gdb.base/auxv.exp: Likewise.
	* gdb.base/bigcore.exp: Likewise.
	* gdb.base/bitfields2.exp: Likewise.
	* gdb.base/bitfields.exp: Likewise.
	* gdb.base/break.exp: Likewise.
	* gdb.base/break-interp.exp: Likewise.
	* gdb.base/callfuncs.exp: Likewise.
	* gdb.base/call-sc.exp: Likewise.
	* gdb.base/commands.exp: Likewise.
	* gdb.base/corefile.exp: Likewise.
	* gdb.base/dbx.exp: Likewise.
	* gdb.base/ending-run.exp: Likewise.
	* gdb.base/exprs.exp: Likewise.
	* gdb.base/funcargs.exp: Likewise.
	* gdb.base/hbreak2.exp: Likewise.
	* gdb.base/huge.exp: Likewise.
	* gdb.base/list.exp: Likewise.
	* gdb.base/memattr.exp: Likewise.
	* gdb.base/overlays.exp: Likewise.
	* gdb.base/printcmds.exp: Likewise.
	* gdb.base/recurse.exp: Likewise.
	* gdb.base/remotetimeout.exp: Likewise.
	* gdb.base/reread.exp: Likewise.
	* gdb.base/savedregs.exp: Likewise.
	* gdb.base/scope.exp: Likewise.
	* gdb.base/sepdebug.exp: Likewise.
	* gdb.base/setshow.exp: Likewise.
	* gdb.base/setvar.exp: Likewise.
	* gdb.base/sigaltstack.exp: Likewise.
	* gdb.base/siginfo-addr.exp: Likewise.
	* gdb.base/siginfo.exp: Likewise.
	* gdb.base/siginfo-obj.exp: Likewise.
	* gdb.base/sigrepeat.exp: Likewise.
	* gdb.base/sigstep.exp: Likewise.
	* gdb.base/structs.exp: Likewise.
	* gdb.base/testenv.exp: Likewise.
	* gdb.base/twice.exp: Likewise.
	* gdb.base/valgrind-db-attach.exp: Likewise.
	* gdb.base/valgrind-infcall.exp: Likewise.
	* gdb.base/varargs.exp: Likewise.
	* gdb.base/watchpoint.exp: Likewise.
	* gdb.cp/gdb1355.exp: Likewise.
	* gdb.cp/misc.exp: Likewise.
	* gdb.disasm/hppa.exp: Likewise.
	* gdb.disasm/t01_mov.exp: Likewise.
	* gdb.disasm/t02_mova.exp: Likewise.
	* gdb.disasm/t03_add.exp: Likewise.
	* gdb.disasm/t04_sub.exp: Likewise.
	* gdb.disasm/t05_cmp.exp: Likewise.
	* gdb.disasm/t06_ari2.exp: Likewise.
	* gdb.disasm/t07_ari3.exp: Likewise.
	* gdb.disasm/t08_or.exp: Likewise.
	* gdb.disasm/t09_xor.exp: Likewise.
	* gdb.disasm/t10_and.exp: Likewise.
	* gdb.disasm/t11_logs.exp: Likewise.
	* gdb.disasm/t12_bit.exp: Likewise.
	* gdb.disasm/t13_otr.exp: Likewise.
	* gdb.gdb/selftest.exp: Likewise.
	* gdb.hp/gdb.base-hp/callfwmall.exp: Likewise.
	* gdb.mi/mi-reverse.exp: Likewise.
	* gdb.pascal/floats.exp: Likewise.
	* gdb.python/py-inferior.exp: Likewise.
	* gdb.threads/attach-into-signal.exp: Likewise.
	* gdb.threads/pthreads.exp: Likewise.
	* gdb.threads/thread_events.exp: Likewise.
	* gdb.threads/watchthreads.exp: Likewise.
	* gdb.trace/actions-changed.exp: Likewise.
	* gdb.trace/actions.exp: Likewise.
	* gdb.trace/ax.exp: Likewise.
	* gdb.trace/backtrace.exp: Likewise.
	* gdb.trace/change-loc.exp: Likewise.
	* gdb.trace/deltrace.exp: Likewise.
	* gdb.trace/disconnected-tracing.exp: Likewise.
	* gdb.trace/ftrace.exp: Likewise.
	* gdb.trace/infotrace.exp: Likewise.
	* gdb.trace/passc-dyn.exp: Likewise.
	* gdb.trace/passcount.exp: Likewise.
	* gdb.trace/pending.exp: Likewise.
	* gdb.trace/qtro.exp: Likewise.
	* gdb.trace/range-stepping.exp: Likewise.
	* gdb.trace/report.exp: Likewise.
	* gdb.trace/save-trace.exp: Likewise.
	* gdb.trace/status-stop.exp: Likewise.
	* gdb.trace/strace.exp: Likewise.
	* gdb.trace/tfile.exp: Likewise.
	* gdb.trace/tfind.exp: Likewise.
	* gdb.trace/trace-break.exp: Likewise.
	* gdb.trace/tracecmd.exp: Likewise.
	* gdb.trace/trace-mt.exp: Likewise.
	* gdb.trace/tspeed.exp: Likewise.
	* gdb.trace/tsv.exp: Likewise.
	* gdb.trace/while-stepping.exp: Likewise.
	* lib/gdb.exp: Likewise.
	* lib/gdbserver-support.exp: Likewise.
	* lib/java.exp: Likewise.
	* lib/mi-support.exp: Likewise.
	* lib/pascal.exp: Likewise.
	* lib/prompt.exp: Likewise.
	* lib/trace-support.exp: Likewise.
2013-06-07 17:31:09 +00:00
Yao Qi ae59b1da21 gdb/testsuite/
* config/monitor.exp (gdb_target_cmd): Remove semicolon after
	'return'.
	(gdb_target_monitor, gdb_load): Likewise.
	* config/sid.exp (gdb_load): Likewise.
	* config/slite.exp (gdb_load): Likewise.
	* config/vx.exp (gdb_start, spawn_vxgdb): Likewise.
	* gdb.ada/arrayidx.exp, gdb.ada/null_array.exp: Likewise.
	* gdb.arch/mips-octeon-bbit.exp (single_step): Likewise.
	(single_step_until): Likewise.
	* gdb.arch/powerpc-d128-regs.exp: Likewise.
	* gdb.arch/system-gcore.exp: Likewise.
	* gdb.base/bigcore.exp (extract_heap): Likewise.
	* gdb.base/break-on-linker-gcd-function.exp: Likewise.
	* gdb.base/call-ar-st.exp: Likewise.
	* gdb.base/call-rt-st.exp: Likewise.
	* gdb.base/call-sc.exp, gdb.base/call-strs.exp: Likewise.
	* gdb.base/callfuncs.exp, gdb.base/completion.exp: Likewise.
	* gdb.base/condbreak.exp, gdb.base/constvars.exp: Likewise.
	* gdb.base/corefile.exp: Likewise.
	* gdb.base/dbx.exp (gdb_file_cmd): Likewise.
	* gdb.base/exprs.exp, gdb.base/fileio.exp: Likewise.
	* gdb.base/fixsection.exp: Likewise.
	* gdb.base/funcargs.exp: Likewise.
	* gdb.base/gcore-buffer-overflow.exp: Likewise.
	* gdb.base/gcore-relro.exp: Likewise.
	* gdb.base/gcore.exp, gdb.base/gdb11530.exp: Likewise.
	* gdb.base/gdb11531.exp, gdb.base/gnu-ifunc.exp: Likewise.
	* gdb.base/info-os.exp, gdb.base/info-proc.exp: Likewise.
	* gdb.base/interp.exp, gdb.base/langs.exp:: Likewise.
	* gdb.base/list.exp: Likewise.
	(set_listsize): Likewise.
	* gdb.base/logical.exp, gdb.base/mips_pro.exp: Likewise.
	* gdb.base/miscexprs.exp, gdb.base/nodebug.exp: Likewise.
	* gdb.base/opaque.exp, gdb.base/pointers.exp: Likewise.
	* gdb.base/psymtab.exp, gdb.base/ptype.exp: Likewise.
	* gdb.base/relational.exp, gdb.base/scope.exp: Likewise.
	* gdb.base/setvar.exp: Likewise.
	(test_set): Likewise.
	* gdb.base/signals.exp, gdb.base/sizeof.exp: Likewise.
	* gdb.base/solib-overlap.exp: Likewise.
	* gdb.base/store.exp, gdb.base/structs.exp: Likewise.
	* gdb.base/structs2.exp, gdb.base/volatile.exp: Likewise.
	* gdb.base/watchpoint.exp (initialize): Likewise.
	(test_simple_watchpoint): Likewise.
	(test_disabling_watchpoints): Likewise.
	(test_watchpoint_triggered_in_syscall): Likewise.
	* gdb.base/whatis.exp, gdb.cp/ambiguous.exp: Likewise.
	* gdb.cp/casts.exp, gdb.cp/ctti.exp: Likewise.
	* gdb.cp/namespace.exp, gdb.cp/nsdecl.exp: Likewise.
	* gdb.cp/psmang.exp, gdb.dwarf2/dw2-ranges.exp: Likewise.
	* gdb.hp/gdb.aCC/optimize.exp: Likewise.
	* gdb.hp/gdb.aCC/watch-cmd.exp: Likewise.
	* gdb.hp/gdb.base-hp/callfwmall.exp: Likewise.
	* gdb.hp/gdb.base-hp/pxdb.exp: Likewise.
	* gdb.hp/gdb.compat/xdb1.exp: Likewise.
	* gdb.hp/gdb.compat/xdb2.exp: Likewise.
	* gdb.hp/gdb.compat/xdb3.exp: Likewise.
	* gdb.hp/gdb.defects/bs14602.exp: Likewise.
	* gdb.hp/gdb.defects/solib-d.exp: Likewise.
	* gdb.mi/gdb792.exp: Likewise.
	* gdb.mi/mi-inheritance-syntax-error.exp: Likewise.
	* gdb.mi/mi-logging.exp, gdb.mi/mi-var-cp.exp : Likewise.
	* gdb.mi/mi-var-rtti.exp, gdb.python/py-type.exp: Likewise.
	* gdb.threads/gcore-thread.exp: Likewise.
	(load_core): Likewise.
	* gdb.threads/pthreads.exp (all_threads_running): Likewise.
	(test_startup, check_control_c): Likewise.
	* gdb.threads/sigstep-threads.exp: Likewise.
	* gdb.threads/thread_check.exp: Likewise.
	* gdb.trace/backtrace.exp, gdb.trace/change-loc.exp: Likewise.
	* gdb.trace/circ.exp (run_trace_experiment): Likewise.
	(set_a_tracepoint, trace_buffer_normal): Likewise.
	(gdb_trace_circular_tests): Likewise.
	* gdb.trace/collection.exp: Likewise.
	* gdb.trace/disconnected-tracing.exp: Likewise.
	* gdb.trace/infotrace.exp: Likewise.
	* gdb.trace/mi-traceframe-changed.exp: Likewise.
	* gdb.trace/mi-tracepoint-changed.exp: Likewise.
	* gdb.trace/mi-tsv-changed.exp (test_create_delete_modify_tsv): Likewise.
	* gdb.trace/packetlen.exp, gdb.trace/passc-dyn.exp: Likewise.
	* gdb.trace/pending.exp, gdb.trace/report.exp: Likewise.
	* gdb.trace/stap-trace.exp: Likewise.
	* gdb.trace/status-stop.exp,gdb.trace/strace.exp: Likewise.
	* gdb.trace/tfind.exp, gdb.trace/trace-break.exp: Likewise.
	* gdb.trace/trace-buffer-size.exp: Likewise.
	* gdb.trace/tspeed.exp, gdb.trace/tsv.exp: Likewise.
	* gdb.trace/unavailable.exp: Likewise.
	* gdb.trace/while-dyn.exp: Likewise.
	* lib/fortran.exp (set_lang_fortran): Likewise.
	* lib/gdb.exp (default_gdb_version, gdb_start_cmd): Likewise.
	(gdb_breakpoint, gdb_reinitialize_dir): Likewise.
	(default_gdb_start, get_compiler_info): Likewise.
	(gdb_compile, gdb_compile_objc, gdb_reload, gdb_init): Likewise.
	(get_debug_format, setup_xfail_format): Likewise.
	(rerun_to_main, gdb_skip_float_test): Likewise.
	(build_id_debug_filename_get, get_remotetimeout): Likewise.
	* lib/java.exp (set_lang_java): Likewise.
	* lib/mi-support.exp (default_mi_gdb_start): Likewise.
	(mi_gdb_reinitialize_dir, mi_gdb_target_cmd): Likewise.
	(mi_gdb_file_cmd, mi_gdb_test): Likewise.
	(mi_run_cmd_full, mi_expect_interrupt): Likewise.
	* lib/objc.exp (set_lang_objc): Likewise.
	* lib/pascal.exp (set_lang_pascal): Likewise.
	* lib/prompt.exp (default_prompt_gdb_start): Likewise.
	* lib/trace-support.exp (gdb_trace_setactions, gdb_tfind_test): Likewise.
	(gdb_readexpr, gdb_gettpnum, gdb_find_recursion_test_baseline): Likewise.
2013-03-14 13:34:06 +00:00
Joel Brobecker 28e7fd6234 Update years in copyright notice for the GDB files.
Two modifications:
  1. The addition of 2013 to the copyright year range for every file;
  2. The use of a single year range, instead of potentially multiple
     year ranges, as approved by the FSF.
2013-01-01 06:33:28 +00:00
Pedro Alves 13e4e967fc 2012-07-19 Pedro Alves <palves@redhat.com>
* config/monitor.exp (gdb_load): Remove redundant ';' in for loop.
	* config/vx.exp (gdb_start): Likewise.
	* gdb.base/printcmds.exp (test_print_repeats_10): Likewise.
	* gdb.base/setvar.exp (test_set): Likewise.
	* gdb.base/sigall.exp: Use foreach+lrange instead of for+continue.
	* gdb.reverse/sigall-precsave.exp: Likewise.
	* gdb.reverse/sigall-reverse.exp: Likewise.
2012-07-19 20:00:59 +00:00
Pedro Alves 048fe15a05 2012-01-27 Pedro Alves <palves@redhat.com>
* config/extended-gdbserver.exp: New file.
	* lib/gdbserver-support.exp (gdbserver_start_extended): Extend
	comment.
	(gdbserver_start_multi, mi_gdbserver_start_multi): New.
	* boards/native-extended-gdbserver.exp: New file.
2012-01-27 13:02:22 +00:00
Joel Brobecker 0b30217134 Copyright year update in most files of the GDB Project.
gdb/ChangeLog:

        Copyright year update in most files of the GDB Project.
2012-01-04 08:17:56 +00:00
Mike Frysinger 33a365dfad gdb: testsuite: add Blackfin support
This fills out a few of the test places where needed for Blackfin targets.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-06 18:40:30 +00:00
Mike Frysinger db863c4274 gdb: tests: set remotetimeout to gdb_load_timeout for remote targets
Rather than relying on the default remotetimeout value (which might be
too small for some slower devices), use the existing gdb_load_timeout
config option to set it.

This adds two new helpers for getting/setting the remotetimout to keep
the new logic simple.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-01 00:19:25 +00:00
Joel Brobecker 7b6bb8daac run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
Joel Brobecker 4c38e0a4fc Update copyright year in most headers.
Automatic update by copyright.sh.
2010-01-01 07:32:07 +00:00
Daniel Jacobowitz f8b7eaf30a * config/m68k-emc.exp, lib/emc-support.exp,
gdb.trace/gdb_c_test.c: Delete.
	* gdb.trace/actions.exp, gdb.trace/backtrace.exp, gdb.trace/circ.exp,
	gdb.trace/collection.exp, gdb.trace/deltrace.exp,
	gdb.trace/infotrace.exp, gdb.trace/limits.exp, gdb.trace/packetlen.exp,
	gdb.trace/passc-dyn.exp, gdb.trace/passcount.exp, gdb.trace/report.exp,
	gdb.trace/save-trace.exp, gdb.trace/tfind.exp, gdb.trace/tracecmd.exp,
	gdb.trace/while-dyn.exp, gdb.trace/while-stepping.exp: Remove special
	casing for m68k-*-elf.
2009-11-05 20:06:03 +00:00
Joel Brobecker 0fb0cc7590 Updated copyright notices for most files. 2009-01-03 05:58:08 +00:00
Jan Kratochvil c7b778ff85 Fix for PR gdb/1543.
* gdb.base/sep.exp: `sep-proc.c' absolute line numbers replaced with
	$LOCATION.
	(location): New variable.
	* config/cfdbug.exp, config/d10v.exp, config/dve.exp, config/i960.exp,
	config/m32r.exp, config/mn10300-eval.exp, config/proelf.exp,
	config/rom68k.exp, config/sh.exp, config/unix.exp, config/vr4300.exp,
	config/vr5000.exp, config/vxworks.exp, gdb.arch/altivec-regs.exp,
	gdb.arch/e500-abi.exp, gdb.arch/e500-regs.exp, gdb.asm/asm-source.exp,
	gdb.base/a2-run.exp, gdb.base/advance.exp, gdb.base/all-bin.exp,
	gdb.base/args.exp, gdb.base/arithmet.exp, gdb.base/assign.exp,
	gdb.base/async.exp, gdb.base/auxv.exp, gdb.base/bigcore.c,
	gdb.base/bigcore.exp, gdb.base/bitfields.exp, gdb.base/bitops.exp,
	gdb.base/break.c, gdb.base/break.exp, gdb.base/break1.c,
	gdb.base/call-ar-st.exp, gdb.base/call-rt-st.exp,
	gdb.base/call-strs.exp, gdb.base/callfuncs.c, gdb.base/callfuncs.exp,
	gdb.base/checkpoint.exp, gdb.base/chng-syms.exp,
	gdb.base/code-expr.exp, gdb.base/commands.exp, gdb.base/completion.exp,
	gdb.base/complex.exp, gdb.base/cond-expr.exp, gdb.base/condbreak.exp,
	gdb.base/consecutive.exp, gdb.base/corefile.exp, gdb.base/cvexpr.c,
	gdb.base/cvexpr.exp, gdb.base/dbx.exp, gdb.base/default.exp,
	gdb.base/define.exp, gdb.base/del.c, gdb.base/detach.exp,
	gdb.base/display.exp, gdb.base/dump.exp, gdb.base/echo.exp,
	gdb.base/environ.exp, gdb.base/eval-skip.exp, gdb.base/exprs.exp,
	gdb.base/fileio.exp, gdb.base/find.exp, gdb.base/finish.exp,
	gdb.base/funcargs.exp, gdb.base/gcore-buffer-overflow.exp,
	gdb.base/gcore.exp, gdb.base/gdb1555.exp, gdb.base/gdbvars.exp,
	gdb.base/help.exp, gdb.base/huge.exp, gdb.base/info-proc.exp,
	gdb.base/interrupt.exp, gdb.base/jump.exp, gdb.base/langs.exp,
	gdb.base/lineinc.exp, gdb.base/list.exp, gdb.base/macscp.exp,
	gdb.base/maint.exp, gdb.base/mips_pro.exp, gdb.base/miscexprs.exp,
	gdb.base/nodebug.exp, gdb.base/nofield.c, gdb.base/opaque.exp,
	gdb.base/overlays.exp, gdb.base/page.exp, gdb.base/pc-fp.exp,
	gdb.base/pending.c, gdb.base/pendshr.c, gdb.base/pointers.exp,
	gdb.base/psymtab.exp, gdb.base/ptype.exp, gdb.base/randomize.c,
	gdb.base/readline.exp, gdb.base/recurse.exp, gdb.base/regs.exp,
	gdb.base/relational.exp, gdb.base/relocate.exp, gdb.base/remote.exp,
	gdb.base/reread.exp, gdb.base/return.exp, gdb.base/return2.exp,
	gdb.base/scope.exp, gdb.base/sect-cmd.exp, gdb.base/sep-proc.c,
	gdb.base/sep.c, gdb.base/sep.exp, gdb.base/sepdebug.c,
	gdb.base/sepdebug.exp, gdb.base/setshow.exp, gdb.base/shlib-call.exp,
	gdb.base/sigaltstack.c, gdb.base/so-indr-cl.exp, gdb.base/solib.exp,
	gdb.base/source.exp, gdb.base/start.c, gdb.base/step-bt.c,
	gdb.base/step-line.exp, gdb.base/structs.c, gdb.base/structs.exp,
	gdb.base/structs2.exp, gdb.base/term.exp, gdb.base/twice.exp,
	gdb.base/type-opaque.exp, gdb.base/until.exp,
	gdb.base/value-double-free.c, gdb.base/varargs.exp,
	gdb.base/watchpoint.exp, gdb.base/whatis-exp.exp, gdb.disasm/am33.exp,
	gdb.disasm/h8300s.exp, gdb.disasm/hppa.exp, gdb.disasm/mn10300.exp,
	gdb.disasm/sh3.exp, gdb.disasm/t01_mov.exp, gdb.disasm/t02_mova.exp,
	gdb.disasm/t03_add.exp, gdb.disasm/t04_sub.exp, gdb.disasm/t05_cmp.exp,
	gdb.disasm/t06_ari2.exp, gdb.disasm/t07_ari3.exp,
	gdb.disasm/t08_or.exp, gdb.disasm/t09_xor.exp, gdb.disasm/t10_and.exp,
	gdb.disasm/t11_logs.exp, gdb.disasm/t12_bit.exp,
	gdb.disasm/t13_otr.exp, gdb.fortran/exprs.exp, gdb.fortran/types.exp,
	gdb.hp/gdb.aCC/exception.exp, gdb.hp/gdb.aCC/optimize.exp,
	gdb.hp/gdb.aCC/watch-cmd.exp, gdb.hp/gdb.base-hp/callfwmall.exp,
	gdb.hp/gdb.base-hp/dollar.exp, gdb.hp/gdb.base-hp/hwwatchbus.exp,
	gdb.hp/gdb.base-hp/pxdb.exp, gdb.hp/gdb.base-hp/reg-pa64.exp,
	gdb.hp/gdb.base-hp/reg.exp, gdb.hp/gdb.base-hp/sized-enum.exp,
	gdb.hp/gdb.base-hp/so-thresh.exp, gdb.hp/gdb.compat/xdb1.exp,
	gdb.hp/gdb.compat/xdb2.exp, gdb.hp/gdb.compat/xdb3.exp,
	gdb.java/jmisc.exp, gdb.java/jv-exp.exp, gdb.java/jv-print.exp,
	gdb.mi/gdb669.exp, gdb.mi/gdb680.exp, gdb.mi/gdb701.exp,
	gdb.mi/gdb792.exp, gdb.mi/mi-basics.exp, gdb.mi/mi-console.exp,
	gdb.mi/mi-hack-cli.exp, gdb.mi/mi-pending.c, gdb.mi/mi-pendshr.c,
	gdb.mi/mi-pthreads.exp, gdb.mi/mi-read-memory.exp, gdb.mi/mi-regs.exp,
	gdb.mi/mi-syn-frame.exp, gdb.mi/mi-until.exp, gdb.mi/mi2-basics.exp,
	gdb.mi/mi2-console.exp, gdb.mi/mi2-hack-cli.exp,
	gdb.mi/mi2-pthreads.exp, gdb.mi/mi2-read-memory.exp,
	gdb.mi/mi2-regs.exp, gdb.mi/mi2-syn-frame.exp, gdb.mi/mi2-until.exp,
	gdb.pascal/types.exp, gdb.stabs/weird.exp,
	gdb.threads/gcore-thread.exp, gdb.threads/manythreads.exp,
	gdb.threads/print-threads.exp, gdb.threads/pthreads.exp,
	gdb.threads/schedlock.exp, gdb.threads/step.exp, gdb.threads/step2.exp,
	gdb.threads/switch-threads.exp, gdb.threads/thread-specific.exp,
	gdb.threads/thread_check.exp, gdb.threads/thread_events.exp,
	gdb.threads/tls-nodebug.exp, gdb.threads/tls-shared.exp,
	gdb.threads/tls.exp, gdb.trace/actions.exp, gdb.trace/backtrace.exp,
	gdb.trace/circ.exp, gdb.trace/collection.exp, gdb.trace/deltrace.exp,
	gdb.trace/infotrace.exp, gdb.trace/limits.exp, gdb.trace/packetlen.exp,
	gdb.trace/passc-dyn.exp, gdb.trace/passcount.exp, gdb.trace/report.exp,
	gdb.trace/save-trace.exp, gdb.trace/tfind.exp, gdb.trace/tracecmd.exp,
	gdb.trace/while-dyn.exp, gdb.trace/while-stepping.exp,
	lib/mi-support.exp, lib/trace-support.exp: Remove reference
	to bug-gdb@prep.ai.mit.edu .
2008-08-06 12:52:08 +00:00
Daniel Jacobowitz 9b254dd1ce Updated copyright notices for most files. 2008-01-01 22:53:26 +00:00
Joel Brobecker e22f8b7c8c Switch the license of all .exp files to GPLv3.
Switch the license of all .f and .f90 files to GPLv3.
        Switch the license of all .s and .S files to GPLv3.
2007-08-23 18:14:19 +00:00
Daniel Jacobowitz 2cc176786d * config/default.exp: New file. 2007-08-13 14:35:59 +00:00
Kevin Buettner 7b5ebade65 * config/sid.exp (gdb_load): Add test for empty argument. Adjust
return value to be compatible with gdb_run_cmd in lib/gdb.exp.
	Remove call to gdb_unload.
2007-07-19 00:41:27 +00:00
Daniel Jacobowitz b0f4b84b5c * infrun.c (inferior_ignoring_startup_exec_events): Delete.
(start_remote): Use STOP_QUIETLY_REMOTE.
	(handle_inferior_event): Do not condition TARGET_WAITKIND_LOADED
	support on a SOLIB_ADD definition.  Update breakpoints_inserted.
	Update to match shared library event breakpoint support.  Only
	resume if appropriate.  Handle STOP_QUIETLY_REMOTE.
	(normal_stop): Handle TARGET_WAITKIND_LOADED.
	* fork-child.c (startup_inferior): Do not set
	inferior_ignoring_startup_exec_events
	* inferior.h (inferior_ignoring_startup_exec_events): Delete
	declaration.
	(enum stop_kind): Improve documentation.  Add STOP_QUIETLY_REMOTE.

	* config/gdbserver.exp (gdb_reconnect): New.
	* gdb.base/so-disc-shr.c, gdb.base/solib-disc.c,
	gdb.base/solib-disc.exp: New files.
	* lib/gdb.exp (gdb_test_multiple): Allow tests to match "Ending
	remote debugging".
	(gdb_compile): Add shlib_load flag.
	* lib/gdbserver-support.exp (gdbserver_run): Save the protocol and
	port.
	(gdbserver_reconnect): New.
2007-07-02 21:29:28 +00:00
Vladimir Prus b04e06d776 * config/unknown.exp: Remove. 2007-05-15 17:06:41 +00:00
Corinna Vinschen b7b73cae89 * config/sim.exp (gdb_target_sim): Just return with -1 when setting
target sim fails.  Return 0 otherwise.
	(gdb_load): Return prematurely if gdb_target_sim fails.
2007-04-25 11:38:45 +00:00
Daniel Jacobowitz 8807d78bec * Makefile.in (SFILES): Remove nlmread.c.
(COMMON_OBS): Remove nlmread.o.
	(nlmread.o): Delete rule.
	* README: Delete reference to remote-st.c.
	* acinclude.m4 (CY_AC_TCL_LYNX_POSIX): Delete.
	* defs.h (enum gdb_osabi): Delete GDB_OSABI_NETWARE and
	GDB_OSABI_LYNXOS.
	* i386-tdep.c (i386_nw_init_abi, i386_nlm_osabi_sniffer): Delete.
	(_initialize_i386_tdep): Do not reference them.
	* nlmread.c: Delete file.
	* osabi.c (gdb_osabi_names): Remove NetWare and LynxOS.
	* target.c: Doc update.
	* thread.c: Delete commented include.
	* config/alpha/tm-alpha.h: Doc update.

	* gdb.texinfo (Startup): Delete references to some alternate
	names for .gdbinit.
	(Thread): Remove LynxOS reference.
	(Tandem ST2000): Delete target-specific documentation.
	* gdbint.texinfo (Symbol Handling): Remove mention of NLM.
	(Target Architecture Definition): Remove mention of GDB_OSABI_NETWARE
	and GDB_OSABI_LYNXOS.

	* config/netware.exp: Delete file.
2007-03-30 12:57:44 +00:00
Daniel Jacobowitz b741e21792 * config/gdbserver.exp (gdbserver_gdb_load): Update argument list.
(gdb_load): Delete, replace with...
	(gdb_reload): ...this.
	* gdb.server/server-run.exp: Use gdb_load and gdbserver_run.
	* gdb.server/server-mon.exp: Likewise.
	* lib/gdb.exp (gdb_run_cmd): Use gdb_reload.
	(gdb_start_cmd): New.
	(gdb_file_cmd): Save the last loaded file.
	(gdb_reload): New.
	(gdb_gnu_strip_debug): Use transform.
	* lib/gdbserver-support.exp (gdbserver_spawn): Move file download
	support here.  Use new $last_loaded_file.  Check mtime.
	(gdb_target_cmd): Handle ObjC failure case.
	(infer_host_exec): Delete.
	(gdbserver_load): Rename to...
	(gdbserver_run): ...this.  Simplify.
	* lib/mi-support.exp (mi_gdb_file_cmd): Set last_loaded_file.
	(mi_gdb_load): Move most contents to a new function...
	(mi_gdb_target_load): ...here.  Simplify call to gdbserver_gdb_load.
	(mi_run_cmd): Use mi_gdb_target_load.
	* gdb.base/break.exp, gdb.base/ending-run.exp, gdb.base/pending.exp,
	gdb.base/sepdebug.exp, gdb.base/unload.exp, gdb.objc/objcdecode.exp:
	Use gdb_run_cmd.
	* gdb.base/charsign.exp: Remove incorrect comment.
	* gdb.base/dbx.exp (gdb_file_cmd): Set last_loaded_file.
	* gdb.ada/exec_changed.exp, gdb.ada/null_record.exp, gdb.ada/start.exp,
	gdb.base/start.exp: Use gdb_start_cmd.
2007-03-27 17:59:38 +00:00
Daniel Jacobowitz 6aba47ca06 Copyright updates for 2007. 2007-01-09 17:59:20 +00:00
Michael Snyder 7b880e0bb7 2006-09-20 Michael Snyder <michael.snyder@localhost.localdomain>
* abug.exp, cpu32bug.exp, est.exp hmsirom.exp, nind.exp:
	Remove unused / obsolete files.
2006-09-20 22:56:34 +00:00
Daniel Jacobowitz 3d00d119d3 gdb/
* symfile.c (download_write_size): Remove.
	(show_download_write_size): Remove.
	(load_section_callback): Don't use download_write_size.
	(_initialize_symfile): Don't register download_write_size.
	* NEWS: Mention 'download-write-size' removal.
gdb/doc/
	* gdb.texinfo (Target Commands): Remove
	'set download-write-size' and 'show download-write-size'.
gdb/testsuite/
	* config/monitor.exp (gdb_load): Remove support for obsolete
	download-write-size.
	* gdb.base/remote.exp: Likewise.  Update all callers of
	gdb_timed_load.
2006-08-08 15:48:08 +00:00
Daniel Jacobowitz 6f8eac0e51 gdb/testsuite/
* Makefile.in (ALL_SUBDIRS): Add gdb.gdbserver.
	* configure.ac: Create gdb.gdbserver/Makefile.
	* configure: Regenerated.
	* lib/gdbserver-support.exp: New file, derived from
	config/gdbserver.exp.
	* config/gdbserver.exp: Use gdbserver-support.exp.
	* gdb.gdbserver/Makefile.in: New file.
	* gdb.gdbserver/server.c: New file.
	* gdb.gdbserver/server-run.exp: New file.
gdb/
	* config/fnchange.lst: Add testsuite/gdb.gdbserver entries.
2005-04-08 12:57:00 +00:00
Daniel Jacobowitz 7e813ac51f * lib/mi-support.exp (mi_gdb_load): Use /tmp for gdbserver
downloads.
	* config/gdbserver.exp (gdb_load): Likewise.
2005-03-25 20:38:55 +00:00
Richard Earnshaw 954269c2f7 * config/sim.exp (gdb_load): Return 0 on success, -1 on failure. 2004-11-28 23:17:33 +00:00
Felix Lee e05389b893 2004-10-06 Felix Lee <felix+log1@specifixinc.com>
* config/gdbserver.exp (gdb_load): Use right filename on remote.
2004-10-06 22:51:00 +00:00
Michael Chastain 564803d921 2004-09-05 Michael Chastain <mec.gnu@mindspring.com>
* config/hppro.exp: Removed.
2004-09-05 04:46:24 +00:00
Michael Chastain 7c6807ceba 2004-09-05 Michael Chastain <mec.gnu@mindspring.com>
* config/sparclet.exp: Removed.
2004-09-05 04:43:00 +00:00
Michael Chastain bf7e26dda2 2004-09-05 Michael Chastain <mec.gnu@mindspring.com>
* config/udi.exp: Removed.
2004-09-05 04:35:23 +00:00
Daniel Jacobowitz 23b23974c7 * config/gdbserver.exp (gdbserver_gdb_load): Wait for a complete
line of output.
2004-02-29 16:51:48 +00:00
Daniel Jacobowitz 83f66e8f3b * config/sim.exp (gdb_load): Handle $arg == "".
* lib/gdb.exp (gdb_run_cmd): Honor gdb,do_reload_on_run.
	* gdb.objc/basicclass.exp: Use gdb_run_cmd.
2004-02-08 03:56:15 +00:00
Daniel Jacobowitz da6012e52d * config/gdbserver.exp (gdbserver_gdb_load): Rename from gdb_load.
Remove downloading, guessing the host executable, the calls to
	gdb_file_cmd and gdb_target_cmd, and "load" support.
	(infer_host_exec): New function broken out from gdb_load.
	(gdb_load): New wrapper for gdbserver_gdb_load.
	* lib/mi-support.exp (mi_gdb_target_cmd): New function, based on
	gdb_target_cmd.  Use -target-select.
	(mi_gdb_file_cmd): New function, broken out from mi_gdb_load.
	Download binaries to the host.  Clear last_mi_remote_file when
	we load a new binary.
	(mi_gdb_load): Call mi_gdb_file_cmd.  If gdbserver.exp is loaded,
	call gdbserver_gdb_load and mi_gdb_target_cmd.
2004-01-18 15:23:30 +00:00