Commit Graph

20 Commits

Author SHA1 Message Date
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
Anders Granlund 717cf30c82 Introduce gdb_interact in testsuite
gdb_interact is a small utility that we have found quite useful to debug
test cases.

Putting gdb_interact in a test suspends it and allows to interact with
gdb to inspect whatever you want. You can then type ">>>" to resume the
test execution. Of course, this is only for gdb devs. It wouldn't make
sense to leave a gdb_interact permanently in a test case.

When starting the interaction with the user, the script prints this
banner:

+------------------------------------------+
| Script interrupted, you can now interact |
| with by gdb. Type >>> to continue.       |
+------------------------------------------+

Notes:
* When gdb is launched, the gdb_spawn_id variable (lib/gdb.exp) is
  assigned -1. Given the name, I would expect it to contain the gdb
  expect spawn id, which is needed for interact. I changed all places
  that set gdb_spawn_id to -1 to set it to the actual gdb spawn id
  instead.

* When entering the "interact" mode, the last (gdb) prompt is already
  eaten by expect, so it doesn't show up on the terminal. Subsequent
  prompts do appear though. We tried to print "(gdb)" just before the
  interact to replace it. However, it could be misleading if you are
  debugging an MI test case, it makes you think that you are typing in a
  CLI prompt, when in reality it's MI. In the end I decided that since
  the feature is for developers who know what they're doing and that one
  is normally consciously using gdb_interact, the script doesn't need
  to babysit the user.

* There are probably some quirks depending on where in the script
  gdb_interact appears (e.g. it could interfere with following
  commands and make them fail), but it works for most cases. Quirks can
  always be fixed later.

The idea and original implementation was contributed by Anders
Granlund, a colleague of mine. Thanks to him.

gdb/testsuite/ChangeLog:

	* gdb.base/statistics.exp: Assign spawn id to gdb_spawn_id.
	* gdb.base/valgrind-db-attach.exp: Same.
	* gdb.base/valgrind-infcall.exp: Same.
	* lib/mi-support.exp (default_mi_gdb_start): Same.
	* lib/prompt.exp (default_prompt_gdb_start): Same.
	* lib/gdb.exp (default_gdb_spawn): Same.
	(gdb_interact): New.
2015-01-22 15:49:08 -05: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
Joel Brobecker ecd75fc8ee Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
Tom Tromey 62cef5152a test suite update - gdb.base/[t-z]
Convert files gdb.base/[t-z]*.exp to use standard_output_file et al.

	* gdb.base/testenv.exp, gdb.base/tui-layout.exp,
	gdb.base/twice.exp, gdb.base/type-opaque.exp, gdb.base/unload.exp,
	gdb.base/unwindonsignal.exp, gdb.base/valgrind-db-attach.exp,
	gdb.base/valgrind-infcall.exp, gdb.base/value-double-free.exp,
	gdb.base/varargs.exp, gdb.base/watch-cond-infcall.exp,
	gdb.base/watch-cond.exp, gdb.base/watch-non-mem.exp,
	gdb.base/watch-read.exp, gdb.base/watch-vfork.exp,
	gdb.base/watch_thread_num.exp, gdb.base/watchpoint-cond-gone.exp,
	gdb.base/watchpoint-delete.exp, gdb.base/watchpoint-hw.exp,
	gdb.base/watchpoint-solib.exp, gdb.base/watchpoint.exp,
	gdb.base/watchpoints.exp, gdb.base/wchar.exp, gdb.base/whatis.exp:
	Use standard_testfile, standard_output_file, prepare_for_testing,
	clean_restart.
2013-06-27 19:00:47 +00: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
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
Jan Kratochvil 75d9f9ff36 gdb/testsuite/
* gdb.base/valgrind-db-attach.exp: Do not run in remote mode.
2012-07-31 07:35:18 +00:00
Jan Kratochvil f0d1a53ee3 gdb/testsuite/
* gdb.base/valgrind-db-attach.exp (attach to debugger): Fix
	compatibility with valgrind-3.7.0.
2012-01-30 06:48:08 +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
Jan Kratochvil e11ac3a350 gdb/testsuite/
* gdb.base/break-entry.exp: Move the target use_gdb_stub test before
	starting GDB.
	* gdb.base/default.exp: Replace target use_gdb_stub checks by global
	$use_gdb_stub.
	* gdb.base/display.exp: Likewise.
	* gdb.base/ending-run.exp: Likewise.
	* gdb.base/list.exp (test_listsize): Likewise.
	* gdb.base/setshow.exp: Likewise.
	* gdb.base/valgrind-db-attach.exp: Set global use_gdb_stub to 1.
	* lib/gdb.exp (gdb_run_cmd, gdb_start_cmd): Replace target use_gdb_stub
	check by global $use_gdb_stub.
	(gdb_test_multiple): Forbid run, start or attach for !$use_gdb_stub.
	(default_gdb_start): Set global use_gdb_stub from target use_gdb_stub.
	(default_gdb_init): Unset global $use_gdb_stub.
	(gdb_continue_to_end, rerun_to_main): Replace target use_gdb_stub check
	by global $use_gdb_stub.
	* lib/gdbserver-support.exp: Extend comments for set_board_info
	gdb_protocol and gdb,socketport.
	(gdbserver_start_extended): Set global gdbserver_protocol and
	gdbserver_gdbport.  Clear global use_gdb_stub.
	* lib/mi-support.exp (default_mi_gdb_start): Set global use_gdb_stub
	from target use_gdb_stub.
	(mi_run_cmd): Replace target use_gdb_stub check by global $use_gdb_stub.
2011-12-03 20:20:29 +00:00
Pedro Alves a391a2f6df 2011-09-08 Pedro Alves <pedro@codesourcery.com>
* gdb.base/annota1.exp, gdb.base/annota3.exp: Extract the
	inferior's pid and look for a core dump named core.$pid.  Use
	`remote_file' commands on the host instead of hand coding shell
	commands on the build.
	* gdb.base/valgrind-db-attach.exp: Kill the program before
	finishing the test.
2011-09-08 14:56:34 +00:00
Joel Brobecker 7b6bb8daac run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
Doug Evans d3765805ec * gdb.base/valgrind-db-attach.exp: Use unique test name for
attach-to-debugger handling.
2010-07-30 17:28:07 +00:00
Ulrich Weigand 5bbad94c39 * gdb.base/valgrind-db-attach.exp: Fail gracefully if valgrind
does not support ELF executable class.
2010-06-11 23:27:22 +00:00
Michael Snyder de7ff7894a 2010-06-08 Michael Snyder <msnyder@vmware.com>
* gdb.ada/exec_changed.exp:
	Use ".*" instead of "" as wildcard regexp.

	* gdb.base/async.exp: Use ".*" instead of "" as wildcard regexp.
	* gdb.base/call-ar-st.exp: Ditto.
	* gdb.base/checkpoint.exp: Ditto.
	* gdb.base/default.exp: Ditto.
	* gdb.base/dump.exp: Ditto.
	* gdb.base/ending-run.exp: Ditto.
	* gdb.base/fileio.exp: Ditto.
	* gdb.base/miscexprs.exp: Ditto.
	* gdb.base/pointers.exp: Ditto.
	* gdb.base/readline.exp: Ditto.
	* gdb.base/reread.exp: Ditto.
	* gdb.base/restore.exp: Ditto.
	* gdb.base/shlib-call.exp: Ditto.
	* gdb.base/valgrind-db-attach.exp: Ditto.
	* gdb.base/volatile.exp: Ditto.
	* gdb.base/watchpoints.exp: Ditto.

	* gdb.cp/classes.exp: Use ".*" instead of "" as wildcard regexp.

	* gdb.python/py-frame.exp: Use ".*" instead of "" as wildcard regexp.
	* gdb.python/py-value.exp: Ditto.

	* gdb.trace/backtrace.exp: Use ".*" instead of "" as wildcard regexp.
	* gdb.trace/circ.exp: Ditto.
	* gdb.trace/collection.exp: Ditto.
	* gdb.trace/packetlen.exp: Ditto.
	* gdb.trace/passc-dyn.exp: Ditto.
	* gdb.trace/report.exp: Ditto.
	* gdb.trace/tfile.exp: Ditto.
	* gdb.trace/tfind.exp: Ditto.
	* gdb.trace/while-dyn.exp: Ditto.
2010-06-08 22:58:03 +00:00
Michael Snyder 27d3a1a248 2010-06-01 Michael Snyder <msnyder@vmware.com>
* gdb.base/arithmet.exp: Use gdb_test_no_output.
	* gdb.base/arrayidx.exp: Ditto.
	* gdb.base/attach.exp: Ditto.
	* gdb.base/auxv.exp: Ditto.
	* gdb.base/bigcre.exp: Ditto.
	* gdb.base/break-always.exp: Ditto.
	* gdb.base/break-interp.exp: Ditto.
	* gdb.base/break.exp: Ditto.
	* gdb.base/breakpoint-shadow.exp: Ditto.
	* gdb.base/call-ar-st.exp: Ditto.
	* gdb.base/call-sc.exp: Ditto.
	* gdb.base/call-signal-resume.exp: Ditto.
	* gdb.base/callfuncs.exp: Ditto.
	* gdb.base/catch-syscall.exp: Ditto.
	* gdb.base/charset.exp: Ditto.
	* gdb.base/code-expr.exp: Ditto.
	* gdb.base/commands.exp: Ditto.
	* gdb.base/cond-expr.exp: Ditto.
	* gdb.base/condbreak.exp: Ditto.
	* gdb.base/cursal.exp: Ditto.
	* gdb.base/cvexpr.exp: Ditto.
	* gdb.base/default.exp: Ditto.
	* gdb.base/del.exp: Ditto.
	* gdb.base/detach.exp: Ditto.
	* gdb.base/display.exp: Ditto.
	* gdb.base/ena-dis-br.exp: Ditto.
	* gdb.base/eval-skip.exp: Ditto.
	* gdb.base/foll-fork.exp: Ditto.
	* gdb.base/foll-vfork.exp: Ditto.
	* gdb.base/frame-args.exp: Ditto.
	* gdb.base/funcargs.exp: Ditto.
	* gdb.base/gcore-buffer-overflow.exp: Ditto.
	* gdb.base/gdbvars.exp: Ditto.
	* gdb.base/help.exp: Ditto.
	* gdb.base/ifelse.exp: Ditto.
	* gdb.base/included.exp: Ditto.
	* gdb.base/list.exp: Ditto.
	* gdb.base/macscp.exp: Ditto.
	* gdb.base/maint.exp: Ditto.
	* gdb.base/multi-fork.exp: Ditto.
	* gdb.base/overlays.exp: Ditto.
	* gdb.base/page.exp: Ditto.
	* gdb.base/pending.exp: Ditto.
	* gdb.base/pointers.exp: Ditto.
	* gdb.base/pr11022.exp: Ditto.
	* gdb.base/prelink.exp: Ditto.
	* gdb.base/printcmds.exp: Ditto.
	* gdb.base/psymtab.exp: Ditto.
	* gdb.base/randomize.exp: Ditto.
	* gdb.base/relational.exp: Ditto.
	* gdb.base/relocate.exp: Ditto.
	* gdb.base/remote.exp: Ditto.
	* gdb.base/sepdebug.exp: Ditto.
	* gdb.base/set-lang-auto.exp: Ditto.
	* gdb.base/setshow.exp: Ditto.
	* gdb.base/setvar.exp: Ditto.
	* gdb.base/signals.exp: Ditto.
	* gdb.base/signull.exp: Ditto.
	* gdb.base/sigstep.exp: Ditto.
	* gdb.base/sizeof.exp: Ditto.
	* gdb.base/solib-disc.exp: Ditto.
	* gdb.base/store.exp: Ditto.
	* gdb.base/structs.exp: Ditto.
	* gdb.base/structs2.exp: Ditto.
	* gdb.base/subst.exp: Ditto.
	* gdb.base/term.exp: Ditto.
	* gdb.base/trace-commands.exp: Ditto.
	* gdb.base/unwindonsignal.exp: Ditto.
	* gdb.base/valgrind-db-attach.exp: Ditto.
	* gdb.base/varargs.exp: Ditto.
	* gdb.base/watch-cond.exp: Ditto.
	* gdb.base/watch_thread_num.exp: Ditto.
	* gdb.base/watchpoint-cond-gone.exp: Ditto.
	* gdb.base/watchpoint.exp: Ditto.
	* gdb.base/whatis-exp.exp: Ditto.
2010-06-01 21:29:21 +00:00
Daniel Jacobowitz 67bdab6cc5 gdb/testsuite/
* gdb.base/valgrind-db-attach.exp: Use unsupported instead of xfail.
	Recognize "command not found".
2010-02-16 21:22:46 +00:00
Jan Kratochvil 9f2982ff0b gdb/
Support Valgrind attachments broken by the PIE support.
	* auxv.c: Include gdbcore.h.
	(procfs_xfer_auxv): Make static.  Reduce its comment.  Drop its
	parameters ops, object and annex.  Remove their assertions.
	(ld_so_xfer_auxv, memory_xfer_auxv): New function.
	* auxv.h (procfs_xfer_auxv): Remove comment.  Rename to ...
	(memory_xfer_auxv): ... here.
	* linux-nat.c (linux_xfer_partial): Rename procfs_xfer_auxv to
	memory_xfer_auxv.
	* procfs.c (procfs_xfer_partial): Likewise.
	* solib-svr4.c (svr4_relocate_main_executable): New prototype.
	(svr4_special_symbol_handling): Call svr4_relocate_main_executable.
	(svr4_solib_create_inferior_hook): Conditionalize the
	svr4_relocate_main_executable call.

gdb/testsuite/
	* gdb.base/valgrind-db-attach.exp, gdb.base/valgrind-db-attach.c: New.
2010-01-14 21:15:00 +00:00