Commit Graph

54 Commits

Author SHA1 Message Date
Doug Evans 87fd9e6ed8 * gdb.gdb/selftest.exp (do_steps_and_nexts): Don't reference
uninitialized value of "description".
2014-04-15 16:13:19 -07:00
Yao Qi 7026a7c16e Fix PR16543
Tests in gdb.gdb fail because directory gdb/testsuite/gdb.gdb doesn't
exist in build tree.  This patch appends gdb.gdb/Makefile in AC_OUTPUT,
and adds new Makefile.in in gdb.gdb, so that directory gdb.gdb can be
created during configure.

With this patch applied, tests under gdb.gdb can be run,

$ make check RUNTESTFLAGS='--directory=gdb.gdb'

Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using ../../../../git/gdb/testsuite/config/unix.exp as tool-and-target-specific interface file.
Running ../../../../git/gdb/testsuite/gdb.gdb/complaints.exp ...
Running ../../../../git/gdb/testsuite/gdb.gdb/observer.exp ...
Running ../../../../git/gdb/testsuite/gdb.gdb/python-interrupts.exp ...
FAIL: gdb.gdb/python-interrupts.exp: signal SIGINT
Running ../../../../git/gdb/testsuite/gdb.gdb/python-selftest.exp ...
FAIL: gdb.gdb/python-selftest.exp: call catch_command_errors(execute_command, "python print 5", 0, RETURN_MASK_ALL)
Running ../../../../git/gdb/testsuite/gdb.gdb/selftest.exp ...
Running ../../../../git/gdb/testsuite/gdb.gdb/xfullpath.exp ...

                === gdb Summary ===

gdb/testsuite:

2014-02-10  Yao Qi  <yao@codesourcery.com>

	PR testsuite/16543
	* configure.ac: Append gdb.gdb/Makefile in AC_OUTPUT.
	* configure: Regenerated.
	* Makefile.in: New file.
2014-02-10 09:51:10 +08:00
Doug Evans 4f8fcb74d3 fix copyright year in new files in previous checkin 2014-02-05 20:17:30 -08:00
Doug Evans 6dddc817c1 Extension Language API
* configure.ac (libpython checking): Remove all but python.o from
	CONFIG_OBS.  Remove all but python.c from CONFIG_SRCS.
	* configure: Regenerate.

	* Makefile.in (SFILES): Add extension.c.
	(HFILES_NO_SRCDIR): Add extension.h, extension-priv.h
	(COMMON_OBS): Add extension.o.
	* extension.h: New file.
	* extension-priv.h: New file.
	* extension.c: New file.

	* python/python-internal.h: #include "extension.h".
	(gdbpy_auto_load_enabled): Declare.
	(gdbpy_apply_val_pretty_printer): Declare.
	(gdbpy_apply_frame_filter): Declare.
	(gdbpy_preserve_values): Declare.
	(gdbpy_breakpoint_cond_says_stop): Declare.
	(gdbpy_breakpoint_has_cond): Declare.
	(void source_python_script_for_objfile): Delete.
	* python/python.c: #include "extension-priv.h".
	Delete inclusion of "observer.h".
	(extension_language_python): Moved here and renamed from
	script_language_python in py-auto-load.c.
	Redefined to be of type extension_language_defn.
	(python_extension_script_ops): New global.
	(python_extension_ops): New global.
	(struct python_env): New member previous_active.
	(restore_python_env): Call restore_active_ext_lang.
	(ensure_python_env): Call set_active_ext_lang.
	(gdbpy_clear_quit_flag): Renamed from clear_quit_flag, made static.
	New arg extlang.
	(gdbpy_set_quit_flag): Renamed from set_quit_flag, made static.
	New arg extlang.
	(gdbpy_check_quit_flag): Renamed from check_quit_flag, made static.
	New arg extlang.
	(gdbpy_eval_from_control_command): Renamed from
	eval_python_from_control_command, made static.  New arg extlang.
	(gdbpy_source_script) Renamed from source_python_script, made static.
	New arg extlang.
	(gdbpy_before_prompt_hook): Renamed from before_prompt_hook.  Change
	result to int.  New arg extlang.
	(gdbpy_source_objfile_script): Renamed from
	source_python_script_for_objfile, made static.  New arg extlang.
	(gdbpy_start_type_printers): Renamed from start_type_printers, made
	static.  New args extlang, extlang_printers.  Change result type to
	"void".
	(gdbpy_apply_type_printers): Renamed from apply_type_printers, made
	static.  New arg extlang.  Rename arg printers to extlang_printers
	and change type to ext_lang_type_printers *.
	(gdbpy_free_type_printers): Renamed from free_type_printers, made
	static.  Replace argument arg with extlang, extlang_printers.
	(!HAVE_PYTHON, eval_python_from_control_command): Delete.
	(!HAVE_PYTHON, source_python_script): Delete.
	(!HAVE_PYTHON, gdbpy_should_stop): Delete.
	(!HAVE_PYTHON, gdbpy_breakpoint_has_py_cond): Delete.
	(!HAVE_PYTHON, start_type_printers): Delete.
	(!HAVE_PYTHON, apply_type_printers): Delete.
	(!HAVE_PYTHON, free_type_printers): Delete.
	(_initialize_python): Delete call to observer_attach_before_prompt.
	(finalize_python): Set/restore active extension language.
	(gdbpy_finish_initialization) Renamed from
	finish_python_initialization, made static.  New arg extlang.
	(gdbpy_initialized): New function.
	* python/python.h: #include "extension.h".  Delete #include
	"value.h", "mi/mi-cmds.h".
	(extension_language_python): Declare.
	(GDBPY_AUTO_FILE_NAME): Delete.
	(enum py_bt_status): Moved to extension.h and renamed to
	ext_lang_bt_status.
	(enum frame_filter_flags): Moved to extension.h.
	(enum py_frame_args): Moved to extension.h and renamed to
	ext_lang_frame_args.
	(finish_python_initialization): Delete.
	(eval_python_from_control_command): Delete.
	(source_python_script): Delete.
	(apply_val_pretty_printer): Delete.
	(apply_frame_filter): Delete.
	(preserve_python_values): Delete.
	(gdbpy_script_language_defn): Delete.
	(gdbpy_should_stop, gdbpy_breakpoint_has_py_cond): Delete.
	(start_type_printers, apply_type_printers, free_type_printers): Delete.

	* auto-load.c: #include "extension.h".
	(GDB_AUTO_FILE_NAME): Delete.
	(auto_load_gdb_scripts_enabled): Make public.  New arg extlang.
	(script_language_gdb): Delete, moved to extension.c and renamed to
	extension_language_gdb.
	(source_gdb_script_for_objfile): Delete.
	(auto_load_pspace_info): New member unsupported_script_warning_printed.
	(loaded_script): Change type of language member to
	struct extension_language_defn *.
	(init_loaded_scripts_info): Initialize
	unsupported_script_warning_printed.
	(maybe_add_script): Make static.  Change type of language arg to
	struct extension_language_defn *.
	(clear_section_scripts): Reset unsupported_script_warning_printed.
	(auto_load_objfile_script_1): Rewrite to use extension language API.
	(auto_load_objfile_script): Make public.  Remove support-compiled-in
	and auto-load-enabled checks, moved to auto_load_scripts_for_objfile.
	(source_section_scripts): Rewrite to use extension language API.
	(load_auto_scripts_for_objfile): Rewrite to use
	auto_load_scripts_for_objfile.
	(collect_matching_scripts_data): Change type of language member to
	struct extension_language_defn *.
	(auto_load_info_scripts): Change type of language arg to
	struct extension_language_defn *.
	(unsupported_script_warning_print): New function.
	(script_not_found_warning_print): Make static.
	(_initialize_auto_load): Rewrite construction of scripts-directory
	help.
	* auto-load.h (struct objfile): Add forward decl.
	(struct script_language): Delete.
	(struct auto_load_pspace_info): Add forward decl.
	(struct extension_language_defn): Add forward decl.
	(maybe_add_script): Delete.
	(auto_load_objfile_script): Declare.
	(script_not_found_warning_print): Delete.
	(auto_load_info_scripts): Update prototype.
	(auto_load_gdb_scripts_enabled): Declare.
	* python/py-auto-load.c (gdbpy_auto_load_enabled): Renamed from
	auto_load_python_scripts_enabled and made public.
	(script_language_python): Delete, moved to python.c.
	(gdbpy_script_language_defn): Delete.
	(info_auto_load_python_scripts): Update to use
	extension_language_python.

	* breakpoint.c (condition_command): Replace call to
	gdbpy_breakpoint_has_py_cond with call to get_breakpoint_cond_ext_lang.
	(bpstat_check_breakpoint_conditions): Replace call to gdbpy_should_stop
	with call to breakpoint_ext_lang_cond_says_stop.
	* python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Renamed
	from gdbpy_should_stop.  Change result type to enum scr_bp_stop.
	New arg slang.  Return SCR_BP_STOP_UNSET if py_bp_object is NULL.
	(gdbpy_breakpoint_has_cond): Renamed from gdbpy_breakpoint_has_py_cond.
	New arg slang.
	(local_setattro): Print name of extension language with existing
	stop condition.

	* valprint.c (val_print, value_print): Update to call
	apply_ext_lang_val_pretty_printer.
	* cp-valprint.c (cp_print_value): Update call to
	apply_ext_lang_val_pretty_printer.
	* python/py-prettyprint.c: Remove #ifdef HAVE_PYTHON.
	(gdbpy_apply_val_pretty_printer): Renamed from
	apply_val_pretty_printer.  New arg extlang.
	(!HAVE_PYTHON, apply_val_pretty_printer): Delete.

	* cli/cli-cmds.c (source_script_from_stream): Rewrite to use
	extension language API.
	* cli/cli-script.c (execute_control_command): Update to call
	eval_ext_lang_from_control_command.

	* mi/mi-cmd-stack.c (mi_cmd_stack_list_frames): Update to use
	enum ext_lang_bt_status values.  Update call to
	apply_ext_lang_frame_filter.
	(mi_cmd_stack_list_locals): Ditto.
	(mi_cmd_stack_list_args): Ditto.
	(mi_cmd_stack_list_variables): Ditto.
	* mi/mi-main.c: Delete #include "python/python-internal.h".
	Add #include "extension.h".
	(mi_cmd_list_features): Replace reference to python internal variable
	gdb_python_initialized with call to ext_lang_initialized_p.

	* stack.c (backtrace_command_1): Update to use enum ext_lang_bt_status.
	Update to use enum ext_lang_frame_args.  Update to call
	apply_ext_lang_frame_filter.
	* python/py-framefilter.c (extract_sym): Update to use enum
	ext_lang_bt_status.
	(extract_value, py_print_type, py_print_value): Ditto.
	(py_print_single_arg, enumerate_args, enumerate_locals): Ditto.
	(py_mi_print_variables, py_print_locals, py_print_args): Ditto.
	(py_print_frame): Ditto.
	(gdbpy_apply_frame_filter): Renamed from apply_frame_filter.
	New arg extlang.  Update to use enum ext_lang_bt_status.

	* top.c (gdb_init): Delete #ifdef HAVE_PYTHON call to
	finish_python_initialization.  Replace with call to
	finish_ext_lang_initialization.

	* typeprint.c (do_free_global_table): Update to call
	free_ext_lang_type_printers.
	(create_global_typedef_table): Update to call
	start_ext_lang_type_printers.
	(find_global_typedef): Update to call apply_ext_lang_type_printers.
	* typeprint.h (struct ext_lang_type_printers): Add forward decl.
	(type_print_options): Change type of global_printers from "void *"
	to "struct ext_lang_type_printers *".

	* value.c (preserve_values): Update to call preserve_ext_lang_values.
	* python/py-value.c: Remove #ifdef HAVE_PYTHON.
	(gdbpy_preserve_values): Renamed from preserve_python_values.
	New arg extlang.
	(!HAVE_PYTHON, preserve_python_values): Delete.

	* utils.c (quit_flag): Delete, moved to extension.c.
	(clear_quit_flag, set_quit_flag, check_quit_flag): Delete, moved to
	extension.c.

	* eval.c: Delete #include "python/python.h".
	* main.c: Delete #include "python/python.h".

	* defs.h: Update comment.

	testsuite/

	* gdb.python/py-breakpoint.exp (test_bkpt_eval_funcs): Update expected
	output.

	* gdb.gdb/python-interrupts.exp: New file.
2014-02-05 19:27:58 -08:00
Joel Brobecker ecd75fc8ee Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
Tom Tromey bdfe059466 fix up gdb.gdb
This fixes the gdb.gdb tests to be parallel-safe, by ensuring that the
new "xgdb" file ends up in the standard output directory during the
tests.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.gdb/selftest.exp: Use standard_output_file.
	* lib/selftest-support.exp (do_self_tests): Use
	standard_output_file.
2013-11-04 11:01:48 -07:00
Tom Tromey e379b39141 fix python-selftest.exp failure with gdbserver
python-selftest.exp fails with an error when using the
native-gdbserver.exp board.

The bug is that the selftest code doesn't work in this situation.  It
never has.

This patch fixes the problem by pushing the needed check into
do_self_tests.  This helps prevent the problem in the future.

	* lib/selftest-support.exp (do_self_tests): Reject remote or
	non-native targets.
	* gdb.gdb/complaints.exp: Remove check.
	* gdb.gdb/observer.exp: Remove check.
	* gdb.gdb/xfullpath.exp: Remove check.
	* gdb.gdb/complaints.exp: Remove check.
2013-06-18 14:12:09 +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
Tom Tromey 4a6e676ceb * gdb.gdb/python-selftest.exp: New file. 2013-05-20 20:43:28 +00:00
Tom Tromey c95aea6b79 * lib/selftest-support.exp: New file.
* gdb.gdb/complaints.exp: Load selftest-support.exp.  Use
	do_self_tests.
	(setup_test, find_gdb): Remove.
	* gdb.gdb/observer.exp: Load selftest-support.exp.  Use
	do_self_tests.
	(setup_test, find_gdb): Remove.
	(test_observer): Don't call setup_test.  Remove argument.
	* gdb.gdb/selftest.exp: Load selftest-support.exp.
	(find_gdb): Remove.
	* gdb.gdb/complaints.exp: Load selftest-support.exp.  Use
	do_self_tests.
	(setup_test, find_gdb): Remove.
	(test_with_self): Don't call setup_test.  Remove argument.
2013-05-07 18:06:16 +00:00
Tom Tromey 0f3305ed70 * gdb.gdb/selftest.exp (do_steps_and_nexts): Check for
notice_open_fds.
2013-04-22 20:18:23 +00:00
Jan Kratochvil f5b95b5073 gdb/
Replace xfullpath calls by gdb_realpath calls.
	* cli/cli-cmds.c (find_and_open_script): Remove xfullpath from the
	function comment.
	* dwarf2read.c (dw2_map_expand_apply): Remove parameter full_path.
	Remove it from the iterate_over_some_symtabs call.
	(dw2_map_symtabs_matching_filename): Remove parameter full_path.
	Remove it from the dw2_map_expand_apply calls, remove a block handling
	it.
	* psymtab.c (partial_map_expand_apply): Remove parameter full_path.
	Remove it from the iterate_over_some_symtabs call.
	(partial_map_symtabs_matching_filename): Remove parameter full_path.
	Remove it from the partial_map_expand_apply calls, remove a block
	handling it.  Drop gdb_realpath call and cleanups from the real_path
	handling.
	* source.c (openp): Drop the comment part about xfullpath.  Replace
	xfullpath calls by gdb_realpath calls.
	(find_and_open_source): Replace xfullpath call by gdb_realpath call.
	* symfile.h (struct quick_symbol_functions): Remove parameter full_path
	from method map_symtabs_matching_filename and its comment.
	* symmisc.c (maintenance_print_msymbols): Replace xfullpath call by
	gdb_realpath call.
	* symtab.c (iterate_over_some_symtabs): Remove parameter full_path,
	remove it also from the function comment, remove a block handling it.
	Drop gdb_realpath call and cleanups from the real_path handling.
	(iterate_over_symtabs): Drop variable full_path and its use.
	* symtab.h (iterate_over_some_symtabs): Remove parameter full_path.
	* utils.c (xfullpath): Remove.
	* utils.h (xfullpath): Remove.

gdb/testsuite/
	* gdb.gdb/xfullpath.exp: Replace xfullpath calls by gdb_realpath calls.
2013-02-03 15:54:18 +00:00
Tom Tromey ea3aedcb6b * gdb.gdb/selftest.exp (do_steps_and_nexts): Handle bfd_init
call.
2013-01-22 15:47:54 +00:00
Joel Brobecker 8acc9f485b 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:41:43 +00:00
Yit Phang Khoo b4ca5ed946 2012-09-08 Khoo Yit Phang <khooyp@cs.umd.edu>
Replace -nw option with $INTERNAL_GDBFLAGS in "xgdb" tests to
	avoid spurious results due to ~/.gdbinit.
	* gdb.gdb/complaint.exp (setup_test): Replace -nw option with
	$INTERNAL_GDBFLAGS in run command.
	* gdb.gdb/observer.exp (setup_test): Ditto.
	* gdb.gdb/selftest.exp (test_with_self): Ditto.
	* gdb.gdb/xfullpath.exp (setup_test): Ditto.
2012-09-08 05:29:21 +00:00
Jan Kratochvil 8320cc4fa3 gdb/
* NEWS: Describe new options --init-command=FILE, -ix and
	--init-eval-command=COMMAND, -iex.
	* main.c (struct cmdarg): New enum items CMDARG_INIT_FILE and
	CMDARG_INIT_COMMAND.
	(captured_main): New enum items OPT_IX and OPT_IEX.  Add
	"init-command", "init-eval-command", "ix" and "iex" to the variable
	long_options.  Handle OPT_IX and OPT_IEX.  Process them from CMDARG_VEC.
	New comment for CMDARG_FILE and CMDARG_COMMAND processing.
	(print_gdb_help): Describe --init-command=FILE, -ix and
	--init-eval-command=COMMAND, -iex.

gdb/doc/
	* gdb.texinfo (File Options): Describe --init-command=FILE, -ix and
	--init-eval-command=COMMAND, -iex.
	(Startup): Describe -iex and -ix.  Simplify the example
	for "set auto-load-scripts off".

gdb/testsuite/
	* gdb.gdb/selftest.exp (do_steps_and_nexts): New entry
	for cmdarg_vec = NULL.  Remove entries for cmdsize = 1, cmdarg = and
	ncmd = 0.  New entry for VEC_cleanup cmdarg_s.
2012-03-19 18:19:26 +00:00
Pedro Alves c0b9f2c6e8 2012-02-02 Pedro Alves <palves@redhat.com>
* gdb.gdb/complaints.exp: Skip if gdb,noinferiorio is set.
	* gdb.gdb/selftest.exp (test_with_self): Handle gdb,noinferiorio.
2012-02-02 18:09:07 +00:00
Pedro Alves 97ccebe869 2012-01-16 Pedro Alves <palves@redhat.com>
Remove all calls to strace.
2012-01-16 16:21:53 +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
Joel Brobecker 7b6bb8daac run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
Yao Qi 96e254033d 2010-08-18 Yao Qi <yao@codesourcery.com>
* gdb.gdb/selftest.exp (do_steps_and_nexts): Update test case
	to reflect latest c source file.
2010-08-18 02:30:07 +00:00
Paul N. Hilfinger 0f3bb72eb7 Refactor 'maint time' command statistics.
Consolidate code for displaying per-command time and space statistics to avoid
duplication.  Piggyback on cleanups so that statistics get printed even when
commands terminate as a result of an error.

Changelog

    * gdb/defs.h (make_command_stats_cleanup): Declare.
    (set_display_time): Declare.
    (set_display_space): Declare.
    * gdb/event-top.c (command_handler): Use make_command_stats_cleanup.
    * gdb/main.c (display_time, display_space): Move definitions to utils.c.
    (captured_main): Use make_command_stats_cleanup to get start-up
    statistics.
    Use set_display_time and set_display_space for processing OPT_STATISTICS
    case.
    * gdb/maint.c (maintenance_time_display): Use set_display_time.
    (maintenance_space_display): Use set_display_space.
    * gdb/top.c (execute_command): Remove obsolete 'maint time' code.
    (command_loop): Use make_command_stats_cleanup.
    * gdb/utils.c (struct cmd_stats): Structure for storing initial time
    and space usage.
    (display_time, display_space): Move definitions here from utils.c.
    (set_display_time): New function.
    (set_display_space): New function.
    (make_command_stats_cleanup): New function.
    (report_command_stats): New auxiliary function for
    make_command_stats_cleanup.
    * gdb/testsuite/gdb.gdb/selftest.exp: Adjust expected message for
    capturing start-up runtime.
2010-06-26 06:44:47 +00:00
Doug Evans d5bc977ffb * gdb.gdb/selftest.exp: Remove support for gpl v1 and v2 gdb's. 2010-06-22 00:02:07 +00:00
Michael Snyder f6978de9f5 2010-06-08 Michael Snyder <msnyder@vmware.com>
* gdb.ada/assign_1.exp: Use ".*" instead of "" as wildcard regexp.
	* gdb.ada/boolean_expr.exp:
	* gdb.ada/frame_args.exp: Ditto.
	* gdb.ada/lang_switch.exp: Ditto.
	* gdb.ada/ptype_arith_binop.exp: Ditto.
	* gdb.ada/ref_param.exp: Ditto.
	* gdb.ada/type_coercion.exp:Ditto.

	* gdb.asm/asm-source.exp: Ditto.

	* gdb.base/attach.exp: Ditto.
	* gdb.base/bitfields2.exp: Ditto.
	* gdb.base/call-signal-resume.exp: Ditto.
	* gdb.base/callfuncs.exp: Ditto.
	* gdb.base/commands.exp: Ditto.
	* gdb.base/dbx.exp: Ditto.
	* gdb.base/default.exp: Ditto.
	* gdb.base/dump.exp: Ditto.
	* gdb.base/exprs.exp: Ditto.
	* gdb.base/freebpcmd.exp: Ditto.
	* gdb.base/interrupt.exp: Ditto.
	* gdb.base/list.exp: Ditto.
	* gdb.base/long_long.exp: Ditto.
	* gdb.base/maint.exp: Ditto.
	* gdb.base/ptype.exp: Ditto.
	* gdb.base/return.exp: Ditto.
	* gdb.base/setshow.exp: Ditto.
	* gdb.base/sigbpt.exp: Ditto.
	* gdb.base/sigrepeat.exp: Ditto.

	* gdb.cp/classes.exp: Ditto.

	* gdb.dwarf2/dw2-restore.exp: Ditto.

	* gdb.gdb/selftest.exp: Ditto.

	* gdb.multi/base.exp: Ditto.
	* gdb.multi/bkpt-multi-exec.exp: Ditto.

	* gdb.python/py-block.exp: Ditto.
	* gdb.python/py-prettyprint.exp: Ditto.
	* gdb.python/py-template.exp: Ditto.

	* gdb.server/ext-attach.exp: Ditto.
	* gdb.server/ext-run.exp: Ditto.
	* gdb.server/server-mon.exp: Ditto.

	* gdb.threads/fork-thread-pending.exp: Ditto.
	* gdb.threads/hand-call-in-threads.exp: Ditto.
	* gdb.threads/interrupted-hand-call.exp: Ditto.
	* gdb.threads/linux-dp.exp: Ditto.
	* gdb.threads/manythreads.exp: Ditto.
	* gdb.threads/print-threads.exp: Ditto.
	* gdb.threads/pthreads.exp: Ditto.
	* gdb.threads/schedlock.exp: Ditto.
	* gdb.threads/thread-unwindonsignal.exp: Ditto.
	* gdb.threads/threadapply.exp: Ditto.
2010-06-10 19:48:20 +00:00
Jan Kratochvil 38979823d9 gdb/testsuite/
* gdb.base/commands.exp (add printf tbreak command): Remove trailing
	newline.
	* gdb.gdb/complaints.exp (empty non-verbose non-noisy clear)
	(empty verbose non-noisy clear, empty verbose noisy clear)
	(empty non-verbose noisy clear): Likewise.
2010-06-04 14:26:52 +00:00
Michael Snyder 019ebafccd 2010-06-02 Michael Snyder <msnyder@vmware.com>
* gdb.dwarf2/dw2-basic.exp: Use gdb_test_no_output.
	* gdb.dwarf2/dw2-compressed.exp: Ditto.
	* gdb.dwarf2/dw2-intercu.exp: Ditto.
	* gdb.dwarf2/dw2-intermix.exp: Ditto.
	* gdb.dwarf2/dw2-producer.exp: Ditto.
	* gdb.dwarf2/mac-fileno.exp: Ditto.

	* gdb.gdb/observer.exp: Use gdb_test_no_output.
	* gdb.gdb/selftest.exp: Ditto.

	* gdb.multi/base.exp: Use gdb_test_no_output.

	* gdb.opt/inline-cmds.exp: Use gdb_test_no_output.
2010-06-02 21:46:45 +00:00
Michael Snyder a127f7b491 2010-05-26 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
* gdb.gdb/complaints.exp: Replace send_gdb with gdb_test.
	* gdb.gdb/selftest.exp: Replace send_gdb with gdb_test.
	* gdb.gdb/xfullpath.exp: Replace send_gdb with gdb_test.
2010-05-26 18:31:25 +00:00
Joel Brobecker 02e7ea1823 Do not set prms_id/bug_id anymore.
2010-05-05  Joel Brobecker  <brobecker@adacore.com>

	Remove the use of prms_id and bug_id throughout the testsuite.
2010-05-05 18:07:04 +00:00
Joel Brobecker 4c38e0a4fc Update copyright year in most headers.
Automatic update by copyright.sh.
2010-01-01 07:32:07 +00:00
Vladimir Prus 3ea85240b3 * observer.c (observer_test_first_notification_function)
(observer_test_second_notification_function)
	(observer_test_third_notification_function): Adjust prototype.
2009-02-17 19:52:27 +00:00
Joel Brobecker 0fb0cc7590 Updated copyright notices for most files. 2009-01-03 05:58:08 +00:00
Mark Kettenis 5def828572 * gdb.gdb/selftest.exp (do_steps_and_nexts): Add more matches. 2008-01-26 13:56:37 +00:00
Daniel Jacobowitz 9b254dd1ce Updated copyright notices for most files. 2008-01-01 22:53:26 +00:00
Jan Kratochvil c8f021f824 * gdb.base/default.exp (show version): Update the version text.
* gdb.gdb/selftest.exp (xgdb is at prompt): Likewise.
2007-09-03 14:58:47 +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
Mark Kettenis b6db2c4783 * gdb.gdb/selftest.exp (do_steps_and_nexts): Match spaces as well
as tabs.  Remove redundant test pattern.
2007-03-12 21:58:19 +00:00
Andreas Schwab 6d9c3a8703 * gdb.gdb/selftest.exp (do_steps_and_nexts): Add more matches. 2007-01-31 19:32:12 +00:00
Daniel Jacobowitz 6aba47ca06 Copyright updates for 2007. 2007-01-09 17:59:20 +00:00
Daniel Jacobowitz 2fa63963cd * gdb.base/annota1.exp: Allow .*printf in backtraces.
* gdb.base/annota3.exp: Likewise.
	* gdb.base/sigstep.exp (advancei): Fail if we hit the breakpoint
	again (instead of timing out).
	* gdb.gdb/selftest.exp (do_steps_and_nexts): Add an XFAIL for
	GCC bug 26475.
	* gdb.java/jmisc.exp: Adjust to work with method signatures including
	return types.  Add kfails for GDB bugs 2214 and 2215.  Move exit
	test from jmisc1.exp.
	* gdb.java/jmisc1.exp: Delete.
	* gdb.java/jprint.exp: Adjust to work with method signatures including
	return types.
	* gdb.objc/basicclass.exp: Update for gobjc 4.1 debug info.
	* gdb.threads/linux-dp.exp: Don't be confused by program output.
	* lib/java.exp (compile_java_from_source): Pass the correct type
	to target_compile.
2006-12-31 20:01:25 +00:00
Ulrich Weigand c1d88655bb * gdb.asm/asm-source.exp: Add "spu*-*-*" target.
* gdb.asm/spu.inc: New file.
	* gdb.base/term.exp: Disable if [target_info exists noargs].
	* gdb.gdb/complaints.exp: Disable if ![isnative].
	* gdb.gdb/selftest.exp: Likewise.
	* gdb.gdb/observer.exp: Likewise.
	* gdb.gdb/xfullpath.exp: Likewise.
	* gdb.base/attach.exp: Disable on SPU target.
	* gdb.cp/bs145503.exp: Likewise.
	* gdb.cp/exception.exp: Likewise.
	* gdb.cp/userdef.exp: Likewise.
2006-11-22 17:19:52 +00:00
Mark Kettenis d082a1e285 * gdb.gdb/selftest.exp (test_with_self): Update copyright check. 2005-12-26 14:38:20 +00:00
Michael Chastain 2db8e78e67 2004-09-09 Michael Chastain <mec.gnu@mindspring.com>
* lib/gdb.exp (gdb_file_cmd): Revert the return value to
	previous simple convention.  Use a global variable to store
	information about what was found.
	(gdb_run_cmd): Adapt to reverted return value.
	* gdb.base/remote.exp: Adapt to reverted return value.
	* gdb.gdb/complaints.exp: Likewise.
	* gdb.gdb/observer.exp: Likewise.
	* gdb.gdb/selftest.exp: Likewise.
	* gdb.gdb/xfullpath.exp: Likewise.
2004-09-10 01:04:59 +00:00
Manoj Iyer 3bdcad15ba Use new gdb.exp feature to check for nodebug in the executable for testcases under gdb.gdb 2004-09-01 19:55:00 +00:00
Michael Chastain 3e3ffd2b74 2004-08-27 Michael Chastain <mec.gnu@mindspring.com>
With code from Manoj Iyer <manjo@austin.ibm.com>:
	* lib/gdb.exp (gdb_file_cmd): Return more information in the
	return value.  Add an arm for "no debugging symbols found".
	Change a stray "error" to "perror".
	(gdb_run_cmd): Adapt to new return value.
	* gdb.base/remote.exp: Adapt to new return value.
	* gdb.gdb/complaints.exp: Likewise.
	* gdb.gdb/observer.exp: Likewise.
	* gdb.gdb/selftest.exp: Likewise.
	* gdb.gdb/xfullpath.exp: Likewise.
2004-08-28 23:55:48 +00:00
Michael Chastain c3297504ca 2004-08-13 Michael Chastain <mec.gnu@mindspring.com>
* gdb.gdb/selftest.exp: Revert removal of call to init_malloc.
2004-08-13 10:43:20 +00:00
Andrew Cagney cc503c8aa2 2004-08-10 Andrew Cagney <cagney@gnu.org>
* main.c (captured_main): Delete call to init_malloc.
	* defs.h (init_malloc): Delete declaration.
	* utils.c (mmalloc, mrealloc, mcalloc, mfree)
	(init_malloc): Delete functions.

Index: testsuite/ChangeLog
2004-08-10  Andrew Cagney  <cagney@gnu.org>

	* gdb.gdb/selftest.exp (do_steps_and_nexts): Remove code to skip
	init_malloc call.
2004-08-10 22:36:39 +00:00
Andrew Cagney 756d8c7093 2004-07-19 Andrew Cagney <cagney@gnu.org>
* gdb.base/selftest.exp: Copy file from here ...
	* gdb.gdb/selftest.exp: ... to here.
2004-07-19 13:58:21 +00:00
Andrew Cagney ab89363a82 2004-07-13 Andrew Cagney <cagney@gnu.org>
* gdb.gdb/observer.exp: Update copyright.
	(setup_test): Use gdb_test_multiple.
	(attach_first_observer, attach_second_observer)
	(attach_third_observer, detach_first_observer)
	(detach_second_observer, detach_third_observer)
	(reset_counters, check_counters): Make $message a prefix.
	(test_normal_stop_notifications): Add "args" parameter - a list of
	init functions to be called.  Make $message a prefix,
	(test_observer_normal_stop): Change the message prefixes so that
	they are unique, pass the attach / detach procedures to
	test_normal_stop_notifications.
2004-07-13 14:36:44 +00:00
Joel Brobecker 9099067423 * gdb.gdb/observer.exp (test_normal_stop_notifications): Update
call to observer_notify_normal_stop.
2004-04-16 17:29:43 +00:00
Michael Chastain 49f2741a0a 2003-08-30 Michael Chastain <mec@shout.net>
* gdb.base/selftest.exp: Remove support for m68k*-*-hpux.
	* gdb.gdb/observer.exp: Ditto.
	* gdb.gdb/xfullpath.exp: Ditto.
2003-08-30 04:58:21 +00:00