Commit Graph

3029 Commits

Author SHA1 Message Date
Pedro Alves a13e061a1b gdb/
2008-04-04  Pedro Alves  <pedro@codesourcery.com>

	* mi/mi-cmds.h (enum mi_cmd_result): Delete MI_CMD_ERROR.
	(mi_error_message): Delete declaration.
	* mi/mi-interp.c (mi_cmd_interpreter_exec): Call error instead of
	returning MI_CMD_ERROR.
	* mi/mi-main.c (mi_error_message): Delete.
	(mi_cmd_exec_interrupt):
	(mi_cmd_thread_select, mi_cmd_thread_list_ids)
	(mi_cmd_thread_info): Call error instead of returning
	MI_CMD_ERROR.
	(mi_cmd_data_list_register_values): Call error instead of
	returning MI_CMD_ERROR.  Adapt to new get_register interface.
	(get_register): Change return typo to void.  Call error instead of
	returning MI_CMD_ERROR.
	(mi_cmd_data_write_register_values): Call error instead of
	returning MI_CMD_ERROR.
	(mi_cmd_list_features): Return MI_CMD_DONE.
	(captured_mi_execute_command): Remove MI_CMD_ERROR handling.
	(mi_execute_command): Always print exceptions with -error.

gdb/testsuite/
2008-04-04  Pedro Alves  <pedro@codesourcery.com>

	* gdb.mi/mi-disassemble.exp, gdb.mi/mi-stack.exp,
	gdb.mi/mi-syn-frame.exp, gdb.mi/mi-var-block.exp,
	gdb.mi/mi-var-cmd.exp, gdb.mi/mi-var-display.exp,
	gdb.mi/mi2-disassemble.exp, gdb.mi/mi2-stack.exp,
	gdb.mi/mi2-syn-frame.exp, gdb.mi/mi2-var-block.exp,
	gdb.mi/mi2-var-cmd.exp, gdb.mi/mi2-var-display.exp: Update to not
	expect an mi error duplicated in stderr.
2008-04-04 21:59:25 +00:00
Joel Brobecker eae06beb6d * gdb.cp/ovldbreak.cc: Add missing bodies for methods foo::foofunc.
* gdb.cp/ovldbreak.exp: Set multiple-symbols to "ask".
        Add a couple of tests that verify the behavior when the new setting
        is set to "cancel" and "all".
        * gdb.cp/method2.exp, gdb.cp/templates.exp: Set multiple-symbols to
        "ask" before we start the testing.
2008-04-03 21:42:33 +00:00
Aleksandar Ristovski 79c6ced6ea * gdb.cp/casts.cc: Add class reference variables.
* gdb.cp/casts.exp: New test cases for up/down casting references.
2008-04-01 18:05:13 +00:00
Aleksandar Ristovski f0050c2089 * gdb.cp/casts.cc: Add class reference variables.
* gdb.cp/casts.exp: New test cases for up/down casting references.
2008-04-01 16:16:43 +00:00
Marc Khouzam 6c2d1a6bc9 2008-04-01 Marc Khouzam <marc.khouzam@ericsson.com>
* gdb.mi/mi-var-display.exp: Stop at end of do_special_tests
	instead of beginning to make an extra test pass.
	* gdb.mi/mi2-var-display.exp: Likewise.
2008-04-01 15:18:30 +00:00
Maciej W. Rozycki 55b411d998 * gdb.base/break.exp: Mark failures as such. Fix formatting. 2008-03-31 10:46:17 +00:00
Markus Deuling c6140da2ff 2008-03-31 Markus Deuling <deuling@de.ibm.com>
Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* gdb.arch/spu-info.exp (info spu mailbox): Check for correct initial
	value.  Add xfail for older kernels.
2008-03-31 08:34:42 +00:00
Aleksandar Ristovski 79732189ea 2008-03-28 Aleksandar Ristovski <aristovski@qnx.com>
Bring mi-support in line with gdb.exp.
	* lib/mi-support.exp (default_mi_gdb_start): Rename from mi_gdb_start.
	(mi_gdb_start): New function.
2008-03-28 16:32:11 +00:00
Maciej W. Rozycki 33c3676e65 * gdb.mi/mi-var-cmd.exp: Fix a typo. 2008-03-28 14:01:36 +00:00
Vladimir Prus 92e28119da * gdb.mi/mi-var-display.exp: Remove obsolete xfail.
* gdb.mi/mi2-var-display.exp: Likewise.
2008-03-26 13:36:51 +00:00
Vladimir Prus 9e8e3afe37 * lib/mi-support.exp (mi_create_varobj_checked): New.
(mi_list_varobj_children): Allow to check for a
	value.
	(mi_list_array_varobj_children): New.

	* gdb.mi/mi-var-child.exp: Use mi_create_varobj
	and mi_list_varobj_children, as opposed to hardcoding
	expected strings.
	* gdb.mi/gdb701.exp: Likewise.
	* gdb.mi/gdb792.exp: Likewise.
	* gdb.mi/mi-var-block.exp: Likewise.
	* gdb.mi/mi-var-cmd.exp: Likewise.
	* gdb.mi/mi-var-invalidate.exp: Likewise.
	* gdb.mi/mi2-var-block.exp: Likewise.
	* gdb.mi/mi2-var-child.exp: Likewise.
	* gdb.mi/mi2-var-cmd.exp: Likewise.
	* gdb.mi/mi2-var-display.exp: Likewise.
2008-03-26 13:24:22 +00:00
Jan Kratochvil 9df503519c Fix random false FAILs on i386.
* gdb.base/prelink.exp: Use `--no-exec-shield' for prelink.
2008-03-24 15:16:12 +00:00
Daniel Jacobowitz 31e5d73a44 PR gdb/544
* gdb.cp/annota2.exp, gdb.cp/annota3.exp: Reapply 2008-03-21 changes.
2008-03-24 13:27:07 +00:00
Daniel Jacobowitz 12f4afab79 Revert 2008-03-21 changes. 2008-03-23 17:29:34 +00:00
Daniel Jacobowitz b562a0cb2a PR gdb/544
Suggested by Jan Kratochvil:
	* top.c (gdb_rl_operate_and_get_next_completion): Call
	rl_redisplay_function.
	(gdb_rl_redisplay): New.
	(init_main): Set rl_redisplay_function.

	* gdb.cp/annota2.exp, gdb.cp/annota3.exp: Remove KFAIL for
	fixed PR gdb/544.
2008-03-21 21:44:30 +00:00
Daniel Jacobowitz 17faa917e0 2008-03-21 Daniel Jacobowitz <dan@codesourcery.com>
* gdbthread.h (add_thread_with_info): New.
	* linux-thread-db.c: Add some documentation.
	(GET_LWP, GET_PID, GET_THREAD, is_lwp, is_thread, BUILD_LWP): Delete.
	(struct private_thread_info): Remove th_valid and ti_valid.
	Replace ti with tid.
	(thread_get_info_callback): Do not add TID to the new ptid.  Do
	not cache th or ti.
	(thread_db_map_id2thr, lwp_from_thread): Delete functions.
	(thread_from_lwp): Assert that the LWP is set.  Do not add TID to the
	new PTID.
	(attach_thread): Handle an already-existing thread.  Use
	add_thread_with_info.  Cache the th and tid.
	(detach_thread): Verify that private was set.  Remove verbose
	argument and printing.  Update caller.
	(thread_db_detach): Do not adjust inferior_ptid.
	(clear_lwpid_callback, thread_db_resume, thread_db_kill): Delete.
	(check_event, find_new_threads_callback): Do not add TID to the new PTID.
	(thread_db_wait): Do not use lwp_from_thread.
	(thread_db_pid_to_str): Use the cached TID.
	(thread_db_extra_thread_info): Check that private is set.
	(same_ptid_callback): Delete.
	(thread_db_get_thread_local_address): Do not use it or check
	is_thread.  Check that private is set.  Assume that the thread
	handle is already cached.
	(init_thread_db_ops): Remove to_resume and to_kill.
	* thread.c (add_thread_with_info): New.
	(add_thread): Use it.
	* linux-nat.c (find_thread_from_lwp): Delete.
	(exit_lwp): Do not use it.  Check print_thread_events.  Print before
	deleting the thread.
	(GET_PID, GET_LWP, BUILD_LWP, is_lwp): Move to...
	* linux-nat.h (GET_PID, GET_LWP, BUILD_LWP, is_lwp): ...here.
	* inf-ttrace.c (inf_ttrace_wait): Use print_thread_events and
	printf_unfiltered for thread exits.
	* procfs.c (procfs_wait): Likewise.

2008-03-21  Pedro Alves  <pedro@codesourcery.com>

	* gdb.threads/fork-child-threads.exp: Test next over fork.
2008-03-21 15:44:53 +00:00
Daniel Jacobowitz 6214f497d3 2008-03-21 Chris Demetriou <cgd@google.com>
* symtab.c (rbreak_command): Quote symbol name before passing
	it to break_command.

	* gdb.base/break.exp (rbreak junk): New test for rbreak
	"Junk at end of arguments" issue.
2008-03-21 15:33:11 +00:00
Daniel Jacobowitz 6309237547 * eval.c (evaluate_subexp_for_address): Clarify error message.
Use value_must_coerce_to_target.
	* infcall.c (value_arg_coerce): Call value_coerce_to_target.
	* valops.c (value_assign): Call value_coerce_to_target when
	assigning to anything but internalvars.  Leave GDB-side arrays
	as arrays when assigning to internalvars.
	(value_must_coerce_to_target, value_coerce_to_target): New.
	(value_coerce_array, value_addr): Call value_coerce_to_target.
	(value_array): Create the array in GDB's memory instead of
	the inferior's.
	* value.h (value_must_coerce_to_target, value_coerce_to_target):
	Declare.

	* gdb.texinfo (Expressions): Update description of malloced arrays.

	* gdb.base/printcmds.exp (test_print_array_constants): Do not expect
	*& to work on created array elements.
	(Top level): Test print $pc with a file.  Test string operations
	without a target.
	* gdb.base/ptype.exp: Do not expect *& to work on created array
	elements.
2008-03-21 15:02:38 +00:00
Daniel Jacobowitz b21991b00c * top.c (quit_confirm): Warn that we will kill the program.
* gdb.threads/killed.exp, gdb.threads/manythreads.exp,
	gdb.threads/staticthreads.exp: Update exit query.
2008-03-21 14:39:23 +00:00
Sandra Loosemore c4b347c7ca 2008-03-07 Sandra Loosemore <sandra@codesourcery.com>
gdb/testsuite/
	* lib/gdb.exp (gdb_load_cmd): Fix $args typo in timeout error message.
2008-03-07 16:23:41 +00:00
Daniel Jacobowitz fa4727a64f * breakpoint.c (fetch_watchpoint_value): New function.
(update_watchpoint): Set and clear val_valid.  Use
	fetch_watchpoint_value.  Handle unreadable values on the
	value chain.  Correct check for user-requested array watchpoints.
	(breakpoint_init_inferior): Clear val_valid.
	(watchpoint_value_print): New function.
	(print_it_typical): Use it.  Do not free or clear old_val.  Print
	watchpoints even if old_val == NULL.
	(watchpoint_check): Use fetch_watchpoint_value.  Check for values
	becoming readable or unreadable.
	(watch_command_1): Use fetch_watchpoint_value.  Set val_valid.
	(do_enable_watchpoint): Likewise.
	* breakpoint.h (struct breakpoint): Update comment for val.  Add
	val_valid.
	* NEWS: Mention watchpoints on inaccessible memory.

	* gdb.base/watchpoint.c (global_ptr, func4): New.
	(main): Call func4.
	* gdb.base/watchpoint.exp: Call test_inaccessible_watchpoint.
	(test_inaccessible_watchpoint): New.

	* gdb.texinfo (Set Watchpoints): Mention watchpoints on
	unreadable memory.  Delete obsolete SPARClite reference.
2008-03-03 13:24:12 +00:00
Maciej W. Rozycki 2f34202fde * lib/gdb.exp (gdb_expect): Of all the timeouts provided always
select the largest.
2008-02-29 15:40:20 +00:00
Daniel Jacobowitz 0d6ba1b16e * frame.c (reinit_frame_cache): Only annotate if frames were
previously valid.

	* gdb.base/annota1.exp, gdb.cp/annota2.exp: Update for fewer
	frames-invalid annotations.
2008-02-28 16:24:25 +00:00
Pierre Muller e691325a9c 2008-02-28 Pierre Muller <muller@ics.u-strasbg.fr>
* gdb.base/assign.exp: avoid same output for different tests.
2008-02-28 10:32:50 +00:00
Doug Evans f85b5eccfe * gdb.base/sigstep.exp (breakpoint_to_handler): Remove setup_kfail
for bug 1738.
	(breakpoint_to_handler_entry): Ditto.
2008-02-27 23:42:20 +00:00
Joel Brobecker b40e7bf371 * gdb.base/ending-run.exp: Use the first line of code inside
function body to test breakpoints.
        * gdb.mi/mi-break.exp, gdb.mi/mi2-break.exp: Adjust the actual
        location where the breakpoint is inserted when using the line
        where a function is declared. Fix typo in the description of
        one of the tests.
        * gdb.mi/mi-simplerun.exp, gdb.mi/mi2-simplerun.exp: Likewise.
2008-02-27 20:29:31 +00:00
Pierre Muller 2faca73a4e 2008-02-27 Pierre Muller <muller@ics.u-strasbg.fr>
* gdb.arch/i386-sse.exp: avoid same output for two breakpoint setting
	tests.
2008-02-27 15:52:33 +00:00
Pierre Muller 6f439c366a 2008-02-27 Pierre Muller <muller@ics.u-strasbg.fr>
* gdb.base/args.exp: avoid same output for tests
	with single quotes.
2008-02-27 15:46:46 +00:00
Vladimir Prus 54e52265e2 * breakpoint.c (print_one_breakpoint_location): Revert Enb field
to old format.  Discard breakpoint address if shared library is
	unloaded.
	(breakpoint_1): Adjust formatting of table header accordingly.
2008-02-26 08:14:11 +00:00
Doug Evans 897b09ca9f * gdb.cp/mb-inline.exp: New.
* gdb.cp/mb-inline.h: New.
	* gdb.cp/mb-inline1.cc: New.
	* gdb.cp/mb-inline2.cc: New.
2008-02-08 00:42:26 +00:00
Doug Evans 776592bf17 * breakpoint.c: #include "hashtab.h".
(ambiguous_names_p): New fn.
	(update_breakpoint_locations): When restoring bp enable status, don't
	compare function names if any functions have same name.
	* Makefile.in (breakpoint.o): Add hashtab.h dependency.

	* gdb.cp/mb-inline.exp: New.
	* gdb.cp/mb-inline.h: New.
	* gdb.cp/mb-inline1.cc: New.
	* gdb.cp/mb-inline2.cc: New.
2008-02-08 00:42:07 +00:00
Pierre Muller b1c32d3564 * gdb.pascal/floats.pas: New test program.
* gdb.pascal/floats.exp: New testcase.
2008-02-06 22:24:43 +00:00
Thiago Jung Bauermann 1a4ca44aeb * gdb.base/callfuncs.c (t_float_many_args): New function.
(t_double_many_args): New function.
	* gdb.base/callfuncs.exp: Add tests for exceeding float
	and double parameters passed through the stack.
2008-02-06 03:54:12 +00:00
Joel Brobecker 439048e8fe * gdb.ada/complete/pck.ads, gdb.ada/complete/pck.adb,
gdb.ada/complete/foo.adb: New files.
        * gdb.ada/complete.exp: New testcase.
2008-02-05 22:20:51 +00:00
Doug Evans 301f0ecf99 * eval.c (evaluate_subexp_standard): Fix type of result of mixed
integer/float division operations when EVAL_AVOID_SIDE_EFFECTS.
	* valops.c (value_one): New function.
	* value.h (value_one): Declare.

	Fix argument promotion for binary arithmetic ops for C.
	* valarith.c (unop_result_type): New fn.
	(binop_result_type): New fn.
	(value_binop): Move result type computation to binop_result_type.
	(value_pos, value_neg, value_complement): Move result type
	computation to unop_result_type.

	* gdb.base/whatis-exp.exp: Fix expected result of whatis x+y, x-y, x*y.
2008-02-04 00:23:05 +00:00
Doug Evans dccca035f0 add copyright 2008-02-03 22:17:05 +00:00
Doug Evans 81fe80802c PR 2384
* gdbtypes.c (get_vptr_fieldno): Renamed from fill_in_vptr_fieldno.
	Return basetype, fieldno if found.  All callers updated.
	Don't cache TYPE_VPTR_FIELDNO, TYPE_VPTR_BASETYPE if from different
	objfile.
	* gdbtypes.h (get_vptr_fieldno): Renamed from fill_in_vptr_fieldno.
	* symfile.h (fill_in_vptr_fieldno): Delete.

	* gdb.cp/gdb2384.exp: New file.
	* gdb.cp/gdb2384.cc: New file.
	* gdb.cp/gdb2384-base.h: New file.
	* gdb.cp/gdb2384-base.cc: New file.
2008-02-03 22:13:30 +00:00
Doug Evans 4b071aec13 * gdb.base/sigall.c (main): Ensure all signals aren't blocked. 2008-02-03 00:42:55 +00:00
Joel Brobecker 61137ba64b * gdb.ada/sym_print_name: New test program.
* gdb.ada/sym_print_name.exp: New testcase.
2008-02-01 23:15:36 +00:00
Joel Brobecker 51ba8a62ab * gdb.ada/nested/hello.adb: New file.
* gdb.ada/nested.exp: New testcase.
        * gdb.ada/Makefile.in (EXECUTABLES): Update list.
2008-02-01 22:48:16 +00:00
Vladimir Prus 98deb0daae * breakpoint.c (break_command_1): Return void.
(break_command_really): Return void.  Rethrow
        exceptions instead of returning.
        (gdb_breakpoint): Remove the error_message parameter.
        Return void.  Rename to set_breakpoint.
        * gdb.h (gdb_breakpoint): Rename and move to...
	* breakpoint.h (set_breakpoint): ...here.
        * mi/mi-cmb-break.c (mi_cmd_break_insert): Restore
        event hooks even if exception is thrown.  Adjust to
        gdb_breakpoint interface changes.
2008-02-01 16:24:47 +00:00
Vladimir Prus 723a227560 Properly rethrow exception. This fixes errors
about non-existent functions for -break-insert.
        * breakpoint.c (break_command_really): Use throw_exception
        for rethrowing.  If rethrowing, don't print the exception.
2008-02-01 06:47:20 +00:00
Luis Machado fb546a2f2e * gdb.arch/ppc64-atomic-inst.c: New testcase source file.
* gdb.arch/ppc64-atomic-inst.exp: New testcase expect file.
2008-01-31 16:00:25 +00:00
Pierre Muller 2d8fd90a9c * gdb.pascal/integers.pas: New test program.
* gdb.pascal/integers.exp: New testcase.
2008-01-31 14:49:23 +00:00
Pierre Muller a7fa0dedad * gdb.pascal/hello.exp (binfile): Add ${EXEEXT}. 2008-01-31 14:46:21 +00:00
Thiago Jung Bauermann 5e1a19265c 2008-01-30 Luis Machado <luisgpm@br.ibm.com>
* gdb.arch/powerpc-d128-regs.exp: New testcase expect file.
	* gdb.arch/powerpc-d128-regs.c: New testcase source file.
2008-01-31 13:41:38 +00:00
Joel Brobecker 8d04f9f0c8 * gdb.ada/formatted_ref: New test program.
* gdb.ada/formatted_ref.exp: New testcase.

        * gdb.cp/formatted-ref.cc: New file.
        * gdb.cp/formatted-ref.exp: New testcase.
2008-01-30 19:23:26 +00:00
Joel Brobecker ce75a98f14 * gdb.base/ptype.exp: Add testing of "ptype $pc". 2008-01-30 18:48:07 +00:00
Nick Roberts f43691e395 (test_file_list_exec_source_file): Update to new macro-info field. 2008-01-30 08:50:10 +00:00
Nick Roberts e835f6bf0c *** empty log message *** 2008-01-30 08:49:27 +00:00
Paul N. Hilfinger d118ef8764 2008-01-30 Paul N. Hilfinger <hilfinger@adacore.com>
* valarith.c (value_binop): Add floating-point BINOP_MIN and
	BINOP_MAX cases.
	For BINOP_EXP, use length and signedness of left operand only for
	result, as for shifts.
	For integral operands to BINOP_EXP, use new integer_pow and
	uinteger_pow functions so as to get full range of results.
	(integer_pow): New function.
	(uinteger_pow): New function.

2008-01-30  Paul N. Hilfinger  <hilfinger@adacore.com>

	* gdb.ada/exprs: New test program.
	* gdb.ada/exprs.exp: New testcase.
2008-01-30 07:28:16 +00:00
Thiago Jung Bauermann 7d35ab09d4 * dfp-test.c (DELTA, DELTA_B): New definitions.
(double_val1, double_val2, double_val3, double_val4, double_val5,
	double_val6, double_val7, double_val8, double_val9, double_val10,
	double_val11, double_val12, double_val13, double_val14, dec32_val1,
	dec32_val2, dec32_val3, dec32_val4, dec32_val5, dec32_val6, dec32_val7,
	dec32_val8, dec32_val9, dec32_val10, dec32_val11, dec32_val12,
	dec32_val13, dec32_val14, dec32_val15, dec32_val16, dec64_val1,
	dec64_val2, dec64_val3, dec64_val4, dec64_val5, dec64_val6, dec64_val7,
	dec64_val8, dec64_val9, dec64_val10, dec64_val11, dec64_val12,
	dec64_val13, dec64_val14, dec64_val15, dec64_val16, dec128_val1,
	dec128_val2, dec128_val3, dec128_val4, dec128_val5, dec128_val6,
	dec128_val7, dec128_val8, dec128_val9, dec128_val10, dec128_val11,
	dec128_val12, dec128_val13, dec128_val14, dec128_val15,
	dec128_val16): New global variables.
	(decimal_dec128_align): New function.
	(decimal_mixed): Likewise.
	(decimal_many_args_dec32): Likewise.
	(decimal_many_args_dec64): Likewise.
	(decimal_many_args_dec128): Likewise.
	(decimal_many_args_mixed): Likewise.
	* dfp-test.exp: Add tests calling new inferior functions.
2008-01-30 03:19:26 +00:00
Daniel Jacobowitz 2d717e4f8a * linux-low.c (linux_attach_lwp): Do not _exit after errors.
(linux_kill, linux_detach): Clean up the process list.
	* remote-utils.c (remote_open): Improve port number parsing.
	(putpkt_binary, input_interrupt): Only send interrupts if the target
	is running.
	* server.c (extended_protocol): Make static.
	(attached): Define earlier.
	(exit_requested, response_needed, program_argv): New variables.
	(target_running): New.
	(start_inferior): Clear attached here.
	(attach_inferior): Set attached here.
	(require_running): Define.
	(handle_query): Use require_running and target_running.  Implement
	"monitor exit".
	(handle_v_attach, handle_v_run): New.
	(handle_v_requests): Use require_running.  Handle vAttach and vRun.
	(gdbserver_usage): Update.
	(main): Redo argument parsing.  Handle --debug and --multi.  Handle
	--attach along with other options or after the port.  Save
	program_argv.  Support no initial program.  Resynchronize
	communication with GDB after an error.  Handle "monitor exit".
	Use require_running and target_running.  Always allow the extended
	protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
	restart in extended mode.
	* README: Refer to the GDB manual.  Update --attach usage.

	* remote.c (struct remote_state): Add cached_wait_status.
	(remote_exec_file): New variable.
	(PACKET_vAttach, PACKET_vRun): New constants.
	(extended_remote_restart): Do not query for status.
	(struct start_remote_args): New.
	(remote_start_remote): Take it as a second argument.  Check
	whether the target is running.  Issue an error for non-running
	non-extended targets.  Cache the wait status.  Set inferior_ptid
	here.
	(remote_open_1): Prompt to disconnect non-running targets.  Make
	sure the target is marked running.  Do not set inferior_ptid here.
	Update call to remote_start_remote.  Do not call remote_check_symbols
	if the target is not running.
	(remote_detach_1): Rename from remote_detach.  Take an EXTENDED
	argument.  Handle a non-running target.
	(remote_detach): Use it.
	(extended_remote_detach): New.
	(remote_disconnect): Fix typo.  Use remoute_mourn_1.
	(extended_remote_attach_1, extended_remote_attach)
	(extended_async_remote_attach): New.
	(remote_vcont_resume): Remove unused variable.
	(remote_wait, remote_async_wait): Use any cached wait status.
	(putpkt_binary, getpkt): Clear any cached wait status.
	(extended_remoute_mourn_1): New.
	(extended_remote_mourn): Use it.
	(extended_async_remote_mourn, extended_remote_run): New.
	(extended_remote_create_inferior_1): New.
	(extended_remote_create_inferior): Use it.
	(extended_remote_async_create_inferior): Likewise.
	(remote_xfer_partial): Skip for non-executing targets.
	(init_extended_remote_ops): Set to_detach and to_attach.
	(init_extended_async_remote_ops): Likewise.  Use
	extended_async_remote_mourn.
	(_initialize_remote): Register vAttach, vRun, and
	set remote exec-file.
	* NEWS: Mention vAttach, vRun, and gdbserver extended-remote support.

	* gdb.server/ext-attach.c, gdb.server/ext-attach.exp,
	gdb.server/ext-run.exp: New files.
	* lib/gdbserver-support.exp (gdbserver_download): New.
	(gdbserver_start): New.  Update gdbserver expected
	output.
	(gdbserver_spawn): Use them.
	(gdbserver_start_extended): New.

	* gdb.texinfo (Using the `gdbserver' Program): Add security
	warning.  Rearrange into subsections and subsubsections.  Document
	--multi and --debug.  Correct --with-sysroot typo.  Update --attach
	usage.  Make load reference clearer.  Document monitor exit.
	(Remote Configuration): Document set remote exec-file, attach-packet,
	and run-packet.
	(Packets): Document vAttach and vRun.
2008-01-30 00:51:50 +00:00
Daniel Jacobowitz e85a822c15 * Makefile.in (symfile.o): Update.
* NEWS: Mention exec tracing support.
	* inf-ttrace.c (inf_ttrace_wait): Return TARGET_WAITKIND_EXECD for
	exec events.
	* infcmd.c (kill_if_already_running, detach_command)
	(disconnect_command): Replace SOLIB_RESTART with no_shared_libraries.
	* infrun.c (MAY_FOLLOW_EXEC, may_follow_exec): Delete.
	(follow_exec): Do not check may_follow_exec.  Do not mourn and push
	targets.  Apply the sysroot path to the loaded executable.  Use
	no_shared_libraries.
	* linux-nat.c (linux_child_follow_fork): Print fork following
	messages if verbose.
	(kill_wait_callback): Kill again before waiting a second time.
	* symfile.c (symbol_file_clear): Replace SOLIB_RESTART with
	no_shared_libraries.

	* gdb.base/foll-exec.exp: Update header.  Skip on remote targets.
	Run on GNU/Linux.
	(do_exec_tests): Check for systems which do not support catchpoints.
	Do not match START.
	* gdb.base/foll-fork.exp: Update header.  Skip on remote targets.
	Run on GNU/Linux.  Enable verbose output.
	(check_fork_catchpoints): New.
	(explicit_fork_child_follow, catch_fork_child_follow)
	(tcatch_fork_parent_follow): Update expected messages.
	(do_fork_tests): Use check_fork_catchpoints.
	* gdb.base/foll-vfork.exp: Update header.  Skip on remote targets.
	Run on GNU/Linux.  Enable verbose output.
	(check_vfork_catchpoints): New.
	(vfork_parent_follow_to_bp, tcatch_vfork_then_child_follow): Update
	expected messages.
	(do_vfork_and_exec_tests): Use check_fork_catchpoints.
2008-01-29 22:47:20 +00:00
Jim Blandy 401ea829c8 * lib/gdbserver-support.exp (gdb_target_cmd): Recognize 'unknown
host' errors.
* lib/mi-support.exp (mi_gdb_target_cmd): Same.
2008-01-29 19:36:58 +00:00
Jim Blandy aceaf3add3 * gdb.threads/sigthread.c: Use barriers to ensure that
child_thread and child_thread_two are always initialized before we
start to use them.
2008-01-29 19:20:52 +00:00
Vladimir Prus a5606eee5e Use multiple locations for hardware watchpoints.
This eliminates the need to traverse value chain, doing
	various checks, in three different places.

        * breakpoint.h (struct bp_location): New fields
        lengths and watchpoint_type.
        (struct breakpoint): Remove the val_chain field.
        * breakpoint.c (is_hardware_watchpoint): New.
        (free_valchain): Remove.
        (update_watchpoint): New.
        (insert_bp_location): For hardware watchpoint, just
        directly insert it.
        (insert_breakpoints): Call update_watchpoint_locations
        on all watchpoints.  If we have failed to insert
        any location of a hardware watchpoint, remove all inserted
        locations.
        (remove_breakpoint): For hardware watchpoints, directly
        remove location.
        (watchpoints_triggered): Iterate over locations.
        (bpstat_stop_status): Use only first location of
        a resource watchpoint.
        (delete_breakpoint): Don't call free_valchain.
        (print_one_breakpoint): Don't print all
        locations for watchpoints.
        (breakpoint_re_set_one): Use update_watchpoint for
        watchpoints.
2008-01-29 17:52:47 +00:00
Pierre Muller c55a82bb3c * gdb.base/gdb1056.exp: Add unsigned integer test. 2008-01-29 16:30:25 +00:00
Doug Evans 0993fe0537 * gdb.base/maint.exp: Tighten patterns looking for .text/.data/.bss. 2008-01-28 18:06:59 +00:00
Jim Blandy c7a6993360 * gdb.base/expand-psymtabs.exp: Doc fix to the doc fix. 2008-01-27 22:25:43 +00:00
Jim Blandy 4fe42e7fe7 * gdb.base/expand-psymtabs.exp: Doc fix. 2008-01-27 17:19:06 +00:00
Mark Kettenis 5def828572 * gdb.gdb/selftest.exp (do_steps_and_nexts): Add more matches. 2008-01-26 13:56:37 +00:00
Nick Roberts 8a578dd762 Add value field to tests for output of -var-set-format. 2008-01-23 21:05:16 +00:00
Nick Roberts 5313c9115b *** empty log message *** 2008-01-23 21:04:54 +00:00
Vladimir Prus 93815fbfa5 Inform about new thread in a single place.
* thread.c (add_thread_silent): Renamed
        from add_thread.
        (print_thread_events): New variable definition.
        (show_print_thread_events): New function.
        (_initialize_thread): Add "set print thread-events" and
        "show print thread-events" commands.
        (add_thread): Announce new thread.
        * gdbthread.h (add_thread_silent): Declare.
        (print_thread_events): New variable declaration.
        * inf-ttrace.c (inf_ttrace_wait): Don't
        inform about new thread, as add_thread is always
        called too, and will take care of that.
        * infrun.c (handle_inferior_event): Likewise.
        * procfs.c (procfs_wait): Likewise.
        * remote.c (remote_currthread): Likewise.
        * sol-thread.c (sol_thread_wait): Likewise.
        * win32-nat.c (get_win32_debug_event): Likewise.
        * linux-thread-db.c (attach_thread): Likewise.
        Remove the verbose parameter.
        (check_event): Make detach_thread be verbose
        only if print_thread_events is set.
        * linux-nat.c (lin_lwp_attach_lwp): Don't inform
        about new thread.  This is called only from
        linux-thread-db.c:attach_thread, which will take care.
        Remove the verbose parameter.
        * linux-nat.h (lin_lwp_attach_lwp): Adjust prototype.
2008-01-23 11:26:29 +00:00
Nick Roberts 7bf81d6302 Add value field to tests for output of -var-set-format. 2008-01-23 06:20:57 +00:00
Nick Roberts bb2bed55ec Add the variable octal. 2008-01-23 06:20:34 +00:00
Nick Roberts 467a88eed1 *** empty log message *** 2008-01-23 06:19:31 +00:00
Daniel Jacobowitz d8f82aba69 * gdb.base/float.exp: Allow missing floating point for m68k and
PowerPC.
2008-01-22 21:30:02 +00:00
Vladimir Prus 60c4664782 * breakpoint.c (break_command_really): New parameter
ignore_count.
	(break_command_1): Pass 0 as
	ignore_count to break_command_really.
	(gdb_breakpoint): Pass ignore_count to
	break_command_really.
2008-01-22 19:43:10 +00:00
Pedro Alves c7dd36a172 * gdb.mi/mi-var-child.c (do_children_tests): Add 'dummy' integer
and 'dummy_ptr' integer pointer.  Initialize struct_declarations
	with dummy_ptr's address.
	* gdb.mi/var-cmd.c (do_children_tests): Likewise.
	* gdb.mi/mi-var-child.exp: int_ptr_ptr is now always "editable" on
	all targets.
	* gdb.mi/mi2-var-child.exp: Likewise.
2008-01-17 14:34:22 +00:00
Joel Brobecker 39d5313e31 * gdb.ada/null_array: New test program.
* gdb.ada/null_array.exp: New testcase.
2008-01-09 17:05:26 +00:00
Luis Machado 0aea4bf354 * printcmd.c (printf_command): Add seen_big_h, seen_big_d and
seen_double_big_d, treat the new H, D, and DD modifiers as length
	modifiers.
	* doc/gdb.texinfo (Output): Update documentation on using printf with DFP
	types.
	* testsuite/gdb.base/printcmds.exp (test_printf_with_dfp): Update
	printf calls with required float modifiers.
2008-01-09 13:47:59 +00:00
Joel Brobecker 0b3549005a * gdb.ada/funcall_param: New test program.
* gdb.ada/funcall_param.exp: New testcase.
2008-01-08 19:39:34 +00:00
Joel Brobecker cdb7f5d4dc * gdb.ada/arrayparam: New test program.
* gdb.ada/arrayparam.exp: New testcase.
2008-01-08 19:31:36 +00:00
Joel Brobecker 88e2547f13 * gdb.ada/print_pc.exp: Add verification of where gdb_start_cmd
landed.  Should also fix random failures in the test following it.
2008-01-08 18:17:30 +00:00
Thiago Jung Bauermann f6867ce08c * gdb.base/dfp-exprs.exp (test_dfp_arithmetic_expressions): Add tests
for expressions with decimal float values.
	(test_dfp_conversions): New function to test casts to and from
	decimal float types.
	Call test_dfp_conversions.
	* gdb.base/dfp-test.c (struct decstruct): Add float4 and double8
	elements.
	(main): Initialize ds.float4 and ds.double8 elements.
	* gdb.base/dfp-test.exp (d32_set_tests): Fix typo.  Adjust expect
	string to new error message.
	(d64_set_tests): Likewise.
	(d128_set_tests): Likewise.
	Add tests for expressions with decimal float variables.  Add tests for
	conversions to and from decimal float types.
2008-01-07 22:34:49 +00:00
Joel Brobecker f9c112822a * gdb.ada/packed_tagged/comp_bug.adb: New file.
* gdb.ada/packed_tagged.exp: New testcase.
2008-01-05 15:48:08 +00:00
Joel Brobecker 0ecbca72c8 * gdb.ada/homonym/homonym.ads, gdb.ada/homonym/homonym.adb,
gdb.ada/homonym/homonym_main.adb: New files.
        * gdb.ada/homonym.exp: New testcase.
2008-01-04 21:40:34 +00:00
Joel Brobecker c18d3d891b * gdb.ada/packed_array.exp: Add testing of references to
a packed array.
2008-01-04 20:47:16 +00:00
Joel Brobecker ecc7085baf * gdb.ada/type_coercion/ident.adb, gdb.ada/type_coercion/assign.adb:
New files.
        * gdb.ada/type_coercion.exp: New testcase.
2008-01-04 20:07:40 +00:00
Joel Brobecker c474c9229e * gdb.ada/tagged/pck.ads, gdb.ada/tagged/pck.adb,
gdb.ada/tagged/foo.adb: New file.
        * gdb.ada/tagged.exp: New testcase.
2008-01-04 20:02:29 +00:00
Joel Brobecker 9005b927e2 * gdb.ada/ptype_field/pck.ads, gdb.ada/ptype_field/pck.adb,
gdb.ada/ptype_field/foo.adb: New files.
        * gdb.ada/ptype_field.exp: New testcase.
2008-01-04 15:10:10 +00:00
Joel Brobecker 1a6aaad875 * gdb.ada/print_pc.exp: New testcase. 2008-01-03 19:22:20 +00:00
Joel Brobecker 0ef22f5306 * gdb.ada/taft_type/pck.ads, gdb.ada/taft_type/pck.adb,
gdb.ada/taft_type/p.adb: New files.
        * gdb.ada/taft_type.exp: New testcase.
2008-01-03 19:19:22 +00:00
Joel Brobecker e9a0edba72 * gdb.ada/taft_type/pck.ads, gdb.ada/taft_type/pck.adb,
gdb.ada/taft_type/p.adb: New files.
        * gdb.ada/taft_type.exp: New testcase.
2008-01-03 17:32:10 +00:00
Joel Brobecker 1689ecf896 * gdb.ada/array_bounds/bar.adb: New file.
* gdb.ada/array_bounds.exp: New testcase.
2008-01-03 14:19:52 +00:00
Joel Brobecker a4d0b9c3e1 * gdb.ada/arrayptr/pck.ads, gdb.ada/arrayptr/pck.adb,
gdb.ada/arrayptr/foo.adb: New files.
        * gdb.ada/arrayptr.exp: New testcase.
2008-01-03 13:15:43 +00:00
Joel Brobecker a31ace0071 * gdb.base/set-lang-auto.exp: New testcase. 2008-01-03 04:26:57 +00:00
Joel Brobecker a97fced314 * gdb.ada/fun_addr/foo.adb: New file.
* gdb.ada/fun_addr.exp: New testcase.
2008-01-03 04:12:24 +00:00
Jan Kratochvil ef29ce1ab3 * linux-nat.c (linux_child_follow_fork): Call also CHECK_FOR_THREAD_DB.
* gdb.threads/fork-child-threads.exp, gdb.threads/fork-child-threads.c:
	New files
2008-01-02 13:36:38 +00:00
Joel Brobecker 0fafefe315 * array_subscript_addr/p.adb: New file.
* array_subscript_addr.exp: New testcase.
2008-01-02 12:06:38 +00:00
Joel Brobecker c4359f8d00 * gdb.ada/str_cmp_ref/pck.ads, gdb.ada/str_cmp_ref/foo.adb:
New files.
        * gdb.ada/str_cmp_ref.exp: New testcase.
2008-01-02 11:25:01 +00:00
Daniel Jacobowitz 9b254dd1ce Updated copyright notices for most files. 2008-01-01 22:53:26 +00:00
Joel Brobecker 1aa1b15b3c * gdb.ada/fun_in_declare/pck.ads, gdb.ada/fun_in_declare/pck.adb,
gdb.ada/fun_in_declare/foo.adb: New files.
        * gdb.ada/fun_in_declare.exp: New testcase.
2008-01-01 12:43:41 +00:00
Joel Brobecker 81c9b2cf53 * gdb.ada/ref_param/foo.adb, gdb.ada/ref_param/pck.adb,
gdb.ada/ref_param/pck.ads: New files.
        * gdb.ada/ref_param.exp: New testcase.
2008-01-01 11:42:53 +00:00
Joel Brobecker 319e46745f * gdb.ada/interface/types.ads, gdb.ada/interface/types.adb,
gdb.ada/interface/foo.adb: New files.
        * gdb.ada/interface.exp: New testcase.
2008-01-01 07:25:45 +00:00
Jim Blandy ef682c56ef * gdb.base/multi-forks.exp: Consume all output from child
processes before proceeding to next test.
2007-12-31 21:34:48 +00:00
Jim Blandy f6f3eb6ccf * configure: Regenerated. 2007-12-29 14:01:30 +00:00
Joel Brobecker f652e42f28 * gdb.ada/fixed_cmp/pck.ads, gdb.ada/fixed_cmp/pck.adb,
gdb.ada/fixed_cmp/fixed.adb: New files.
        * gdb.ada/fixed_cmp.exp: New testcase.
2007-12-28 06:32:46 +00:00
Joel Brobecker 6943e5962a * gdb.ada/boolean_expr.exp: New testcase. 2007-12-28 06:17:49 +00:00
Jim Blandy aad9a19303 * gdb.base/multi-forks.exp: Doc fix. 2007-12-26 17:11:16 +00:00
Joel Brobecker fb5f3683c3 * gdb.ada/Makefile.in (EXECUTABLES): Update list.
* gdb.ada/char_param.exp: Do not compile our test program with
        -gnata, this is unnecessary.
        * gdb.ada/char_param/pck.ads: Remove unnecessary "with".
2007-12-26 14:21:53 +00:00
Joel Brobecker 384e4a9cc2 * gdb.ada/print_chars/pck.ads, gdb.ada/print_chars/pck.adb,
gdb.ada/print_chars/foo.adb: New files.
        * gdb.ada/print_chars.exp: New testcase.
2007-12-24 17:13:32 +00:00
Joel Brobecker 01e044f750 * gdb.ada/char_param/pck.ads, gdb.ada/char_param/pck.adb,
gdb.ada/char_param/foo.adb: New files.
        * gdb.ada/char_param.exp: New testcase.
2007-12-24 07:57:00 +00:00
Jim Blandy 0ce17860b0 * gdb.asm/asm-source.exp: Use gdb_get_line_number, instead of
hard-coding source line numbers into the test.
	* gdb.asm/asmsrc1.s, gdb.asm/asmsrc2.s: Add comments for
	gdb_get_line_number to find.
2007-12-22 06:44:28 +00:00
Joel Brobecker 919809b973 * gdb.base/ptype.c (highest): New struct type.
(the_highest): New variable of that type.
        (main): Add dummy assignment to a field of variable the_highest.
        * gdb.base/ptype.exp: Test type printing of our new variable.
2007-12-22 05:28:19 +00:00
Pierre Muller abc8a88dc5 2007-12-19 Pierre Muller <muller@ics-u-strasbg.fr>
* (gdb.base/watch_thread_num.exp): Add breakpoint at thread_function
	and record first explicitly generated thread number.
	Use that thread number for thread specific watchpoint test.
	Add iteration number to repetitive tests.
2007-12-19 14:40:37 +00:00
Carlos Eduardo Seo 5158f3e312 * gdb.base/expand-psymtabs.c: New testcase
source file.
	* gdb.base/expand-psymtabs.exp: New testcase
	expect file.
2007-12-17 14:56:33 +00:00
Luis Machado 37e4754d76 * breakpoint.c: (watch_command_1): Parse additional optional
"thread" parameter to the watchpoint command and set the
      "thread" member of the breakpoint struct.
      * doc/gdb.texinfo: Add new parameter's description.
      * testsuite/gdb.base/watch_thread_num.c: New testcase source file.
      * testsuite/gdb.base/watch_thread_num.exp: New testcase expect file.
2007-12-17 12:32:23 +00:00
Joel Brobecker 551e5d04d1 * gdb.ada/frame_args/foo.adb: New file.
* gdb.ada/frame_args/pck.ads: New file.
        * gdb.ada/frame_args/pck.adb: New file.
        * gdb.ada/frame_args.exp: New testcase.
2007-12-17 07:26:08 +00:00
Joel Brobecker a05ee09706 * gdb.base/frame-args.c: New file.
* gdb.base/frame-args.exp: New testcase.
2007-12-17 07:18:03 +00:00
Joseph Myers c162e8c9a4 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
Joseph Myers  <joseph@codesourcery.com>

	* configure.ac: Check for *-*-solaris2.1[[0-9]]* instead of
	*-*-solaris2.1[[0-9]].
	* configure: Regenerate.
	* procfs.c (proc_set_current_signal): If redelivering a signal,
	reuse the current siginfo if possible.

testsuite:
	* gdb.base/siginfo-addr.exp, gdb.base/siginfo-addr.c: New.
2007-12-16 22:19:21 +00:00
Vladimir Prus afe8ab2206 Add support for pending breakpoints in MI.
* gdb.h (gdb_breakpoint): Add parameter pending.
	* breakpoint.c (gdb_breakpoint): Add parameter pending.
	* mi/mi-cmd-break.c (mi_break_insert): Change
	comment to refer to manual.  Add support for
	the -f flag, for pending breakpoint.
2007-12-14 18:15:47 +00:00
Jim Blandy dfdfb3ca98 Remove unused support for target-based exception catching.
* target.h (struct target_ops): Delete
to_enable_exception_callback and to_get_current_exception_event
members.
(target_enable_exception_callback)
(target_get_current_exception_event): Delete macros.
* target.c (update_current_target): Remove code to inherit and
default those members.
(debug_to_enable_exception_callback)
(debug_to_get_current_exception_event): Delete functions.
(setup_target_debug): Don't install those methods.
* inf-child.c (inf_child_enable_exception_callback)
(inf_child_get_current_exception_event): Delete dummy functions.
(inf_child_target): Don't install them in the target vector.
* breakpoint.h (enum bptype): Delete bp_catch_catch,
bp_catch_throw.
* breakpoint.c (cover_target_enable_exception_callback)
(ep_is_exception_catchpoint, create_exception_catchpoint): Delete
functions.
(insert_bp_location, update_breakpoints_after_exec)
(remove_breakpoint, ep_is_catchpoint, print_it_typical)
(bpstat_stop_status, bpstat_what)
(bpstat_get_triggered_catchpoints, print_one_breakpoint_location)
(user_settable_breakpoint, allocate_bp_location)
(disable_watchpoints_before_interactive_call_start)
(enable_watchpoints_after_interactive_call_stop, mention)
(delete_breakpoint, breakpoint_re_set_one, disable_command)
(enable_command): Remove exception catchpoint cases.
(catch_exception_command_1): Don't try target-based exception
handling.
* stack.c (catch_info): Call print_frame_label_vars
unconditionally.
2007-12-13 02:00:09 +00:00
Jan Kratochvil b7fca99000 * lib/gdb.exp (build_id_debug_filename_get): OBJCOPY pipe being read
must be set to binary.
2007-12-10 14:32:50 +00:00
Pedro Alves 6a1afc1e2a * lib/gdb.exp (gdb_gnu_strip_debug): Remove debug format test. 2007-12-09 11:21:21 +00:00
Daniel Jacobowitz a6b151f187 * remote.c (remote_cmdlist): New variable.
(PACKET_vFile_open, PACKET_vFile_pread, PACKET_vFile_pwrite)
	(PACKET_vFile_close, PACKET_vFile_unlink): New constants.
	(remote_buffer_add_string, remote_buffer_add_bytes)
	(remote_buffer_add_int, remote_hostio_parse_result)
	(remote_hostio_send_command, remote_hostio_open, remote_hostio_pwrite)
	(remote_hostio_pread, remote_hostio_close, remote_hostio_unlink)
	(remote_fileio_errno_to_host, remote_hostio_error, fclose_cleanup)
	(remote_hostio_close_cleanup, remote_file_put, remote_file_get)
	(remote_file_delete, remote_put_command, remote_get_command)
	(remote_delete_command, remote_command): New functions.
	(_initialize_remote): Register new packets and commands.
	* Makefile.in (gdb_fileio_h): New variable.
	(remote.o): Update.
	(SUBDIR_MI_OBS): Add mi-cmd-target.o.
	(SUBDIR_MI_SRCS): Add mi/mi-cmd-target.c.
	(mi-cmd-target.o): New rule.
	* mi/mi-cmd-target.c: New file.
	* mi/mi-cmds.c (mi_cmds): Add target-file-delete, target-file-get,
	and target-file-put.
	* mi/mi-cmds.h (mi_cmd_target_file_get, mi_cmd_target_file_put)
	(mi_cmd_target_file_delete): Declare.
	* remote.h (remote_file_put, remote_file_get, remote_file_delete):
	Declare.
	* NEWS: Describe new file transfer support.

	* gdb.texinfo (Debugging Programs with Multiple Processes): Correct
	formatting.
	(Remote Debugging): Add File Transfer section.
	(Remote Configuration): Document Host I/O packets.
	(GDB/MI): Add GDB/MI File Transfer Commands section.
	(Remote Protocol): Add Host I/O Packets section.
	(Packets): Add vFile.

	* Makefile.in (OBS): Add hostio.o.
	(hostio.o): New rule.
	* server.h (handle_vFile): Declare.
	* hostio.c: New file.
	* server.c (handle_v_requests): Take packet_len and new_packet_len
	for binary packets.  Call handle_vFile.
	(main): Update call to handle_v_requests.

	* gdb.server/file-transfer.exp, gdb.server/transfer.txt,
	gdb.mi/mi-file-transfer.exp: New.
2007-11-30 21:50:19 +00:00
Jan Kratochvil 4303944388 gdb/
* dwarf2read.c (dwarf2_get_pc_bounds): Moved the `DW_AT_ranges' parsing
	code with its variables OBJFILE, CU_HEADER and OBFD into ...
	(dwarf2_ranges_read): ... a new function.
	(read_partial_die): Implemented the parsing of `DW_AT_ranges'.

gdb/testsuite/
	* gdb.dwarf2/dw2-ranges.S, gdb.dwarf2/dw2-ranges.exp: New files.
2007-11-25 21:40:39 +00:00
Maciej W. Rozycki 0ef2251b99 * gdb.trace/backtrace.exp: Fix a typo.
* gdb.trace/circ.exp: Likewise.
* gdb.trace/collection.exp: Likewise.
* gdb.trace/limits.exp: Likewise.
* gdb.trace/report.exp: Likewise.
* gdb.trace/tfind.exp: Likewise.
* gdb.trace/while-dyn.exp: Likewise.
2007-11-22 16:03:00 +00:00
Nick Roberts 15820a9f75 Variables objects of pointers that can't be dereferenced are now
"noneditable".
2007-11-20 20:01:35 +00:00
Nick Roberts 5443631e12 *** empty log message *** 2007-11-20 19:59:05 +00:00
Ulrich Weigand a4ce5b0d02 * config/alpha/alpha-linux.mt: Remove file.
* config/alpha/alpha.mt: Remove file.
	* config/alpha/alpha-osf1.mt: Remove file.
	* config/alpha/fbsd.mt: Remove file.
	* config/alpha/nbsd.mt: Remove file.
	* config/alpha/obsd.mt: Remove file.
	* config/arm/embed.mt: Remove file.
	* config/arm/linux.mt: Remove file.
	* config/arm/nbsd.mt: Remove file.
	* config/arm/obsd.mt: Remove file.
	* config/arm/wince.mt: Remove file.
	* config/avr/avr.mt: Remove file.
	* config/cris/cris.mt: Remove file.
	* config/frv/frv.mt: Remove file.
	* config/h8300/h8300.mt: Remove file.
	* config/i386/cygwin.mt: Remove file.
	* config/i386/fbsd64.mt: Remove file.
	* config/i386/fbsd.mt: Remove file.
	* config/i386/i386gnu.mt: Remove file.
	* config/i386/i386.mt: Remove file.
	* config/i386/i386sol2.mt: Remove file.
	* config/i386/linux64.mt: Remove file.
	* config/i386/linux.mt: Remove file.
	* config/i386/mingw.mt: Remove file.
	* config/i386/nbsd64.mt: Remove file.
	* config/i386/nbsd.mt: Remove file.
	* config/i386/nto.mt: Remove file.
	* config/i386/obsd64.mt: Remove file.
	* config/i386/obsd.mt: Remove file.
	* config/i386/sol2-64.mt: Remove file.
	* config/ia64/ia64.mt: Remove file.
	* config/ia64/linux.mt: Remove file.
	* config/iq2000/iq2000.mt: Remove file.
	* config/m32c/m32c.mt: Remove file.
	* config/m32r/linux.mt: Remove file.
	* config/m32r/m32r.mt: Remove file.
	* config/m68hc11/m68hc11.mt: Remove file.
	* config/m68k/linux.mt: Remove file.
	* config/m68k/monitor.mt: Remove file.
	* config/m68k/nbsd.mt: Remove file.
	* config/m68k/obsd.mt: Remove file.
	* config/m88k/obsd.mt: Remove file.
	* config/mep/mep.mt: Remove file.
	* config/mips/embed.mt: Remove file.
	* config/mips/irix5.mt: Remove file.
	* config/mips/irix6.mt: Remove file.
	* config/mips/linux.mt: Remove file.
	* config/mips/nbsd.mt: Remove file.
	* config/mips/obsd64.mt: Remove file.
	* config/mn10300/linux.mt: Remove file.
	* config/mn10300/mn10300.mt: Remove file.
	* config/mt/mt.mt: Remove file.
	* config/pa/hppahpux.mt: Remove file.
	* config/pa/hppa.mt: Remove file.
	* config/pa/linux.mt: Remove file.
	* config/pa/obsd.mt: Remove file.
	* config/powerpc/aix.mt: Remove file.
	* config/powerpc/linux.mt: Remove file.
	* config/powerpc/nbsd.mt: Remove file.
	* config/powerpc/obsd.mt: Remove file.
	* config/powerpc/ppc-eabi.mt: Remove file.
	* config/s390/s390.mt: Remove file.
	* config/score/embed.mt: Remove file.
	* config/sh/embed.mt: Remove file.
	* config/sh/linux.mt: Remove file.
	* config/sh/nbsd.mt: Remove file.
	* config/sh/obsd.mt: Remove file.
	* config/sh/sh64.mt: Remove file.
	* config/sparc/embed.mt: Remove file.
	* config/sparc/fbsd.mt: Remove file.
	* config/sparc/linux64.mt: Remove file.
	* config/sparc/linux.mt: Remove file.
	* config/sparc/nbsd64.mt: Remove file.
	* config/sparc/nbsd.mt: Remove file.
	* config/sparc/obsd64.mt: Remove file.
	* config/sparc/obsd.mt: Remove file.
	* config/sparc/sol2-64.mt: Remove file.
	* config/sparc/sol2.mt: Remove file.
	* config/sparc/sparc64.mt: Remove file.
	* config/sparc/sparc.mt: Remove file.
	* config/spu/spu.mt: Remove file.
	* config/v850/v850.mt: Remove file.
	* config/vax/nbsd.mt: Remove file.
	* config/vax/obsd.mt: Remove file.
	* config/vax/vax.mt: Remove file.
	* config/xstormy16/xstormy16.mt: Remove file.
	* config/xtensa/xtensa.mt: Remove file.

	* configure.tgt (gdb_target_cpu): Remove.  Do not set anywhere.
	(gdb_target): Likewise.
	(gdb_target_obs): Document.  Set for every target to contents
	of TDEPFILES in former .mt makefile fragment.

	* configure.ac (TARGET_OBS): Define.
	(target_makefile_frag, gdb_target_cpu): Do not define.
	* configure: Regenerate.

	* Makefile.in (MT_FLAGS): Remove.
	(GLOBAL_CFLAGS): Update.
	(TARGET_OBS): Substitute from configure.
	(DEPFILES): Remove TDEPFILES, add TARGET_OBS.
	(@target_makefile_frag@): Remove.

doc/ChangeLog:

	* Makefile.in (Makefile): Do not depend on target_makefile_frag.

testsuite/ChangeLog:

	* Makefile.in (Makefile): Do not depend on target_makefile_frag.
	(target_cpu): Remove.
2007-11-17 00:54:18 +00:00
Vladimir Prus d6e956e5c2 Prevent clear_command from directly modifying breakpoint list.
* Makefile.in (breakpoint_h): Update dependency.
	* breakpoint.c (clear_command): Do not remove
	breakpoints from breakpoint_chain.  Collect breakpoints
	to delete in a vector.
	* breakpoint.h (breakpoint_p): New typedef for pointer to
	breakpoint.  Register vector of breakpoint_p.
2007-11-15 06:28:19 +00:00
Vladimir Prus 214270abf3 Fix crash when a variable object being deleted
has any of its children deleted previously.

	* varobj.c (delete_variable_1): Don't recurse
	into deleted children.
2007-11-07 20:06:29 +00:00
Luis Machado 1a619819d6 * printcmd.c: (printf_command): Add support for new DFP
modifiers %H, %D and %DD.
    * configure.ac: Add check for DECFLOAT printf support.
    * configure: Regenerated.
    * doc/gdb.texinfo: Update printf command's description.
    * testsuite/gdb.base/printcmds.exp: New function
    test_printf_with_dfp.
2007-11-05 11:32:31 +00:00
Doug Evans 5b01a6fa22 * gdb.disasm/t01_mov.s: Remove carriage returns.
* gdb.disasm/t02_mova.s: Ditto.
	* gdb.disasm/t03_add.s: Ditto.
	* gdb.disasm/t04_sub.s: Ditto.
	* gdb.disasm/t05_cmp.s: Ditto.
	* gdb.disasm/t06_ari2.s: Ditto.
	* gdb.disasm/t07_ari3.s: Ditto.
	* gdb.disasm/t08_or.s: Ditto.
	* gdb.disasm/t09_xor.s: Ditto.
	* gdb.disasm/t10_and.s: Ditto.
	* gdb.disasm/t11_logs.s: Ditto.
	* gdb.disasm/t12_bit.s: Ditto.
	* gdb.disasm/t13_otr.s: Ditto.
2007-11-02 20:33:12 +00:00
Jan Kratochvil ec33ab7fc4 * gdb.cp/arg-reference.exp, gdb.cp/arg-reference.c: New files. 2007-11-01 17:34:57 +00:00
Ulrich Weigand ae0d01ff0c * gdb.base/dfp-test.exp: Fail gracefully if toolchain does not
provide DFP support.
2007-10-30 22:29:06 +00:00
Daniel Jacobowitz 55eddb0f7a * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Check the selected
soft float and vector ABIs.  Support the generic vector ABI for
	AltiVec types.
	(do_ppc_sysv_return_value): Likewise.  Correct argument types and
	casts.
	(ppc64_sysv_abi_push_dummy_call): Assert that floating point is
	supported.
	* ppc-tdep.h (enum powerpc_vector_abi): New.
	(struct gdbarch_tdep): Add soft_float and vector_abi.
	* rs6000-tdep.c (setpowerpccmdlist, showpowerpccmdlist)
	(powerpc_soft_float_global, powerpc_vector_strings)
	(powerpc_vector_abi_global, powerpc_vector_abi_string): New.
	(rs6000_gdbarch_init): Check for soft-float and vector ABI markings.
	(set_powerpc_command, show_powerpc_command, powerpc_set_soft_float)
	(powerpc_set_vector_abi): New.
	(_initialize_rs6000_tdep): Register "set powerpc" and "show powerpc"
	commands.
	* Makefile.in (elf_ppc_h): New.
	(rs6000-tdep.o): Update.

	* gdb.texinfo (PowerPC): Document "set powerpc vector-abi" and "set
	powerpc soft-float".

	* gdb.arch/altivec-abi.exp: Run multiple times for GCC on GNU/Linux.
	Test "set powerpc vector-abi".  Skip auto-detection tests for old
	toolchains.
2007-10-30 19:35:35 +00:00
Pedro Alves 7020f05c27 * lib/gdb.exp, gdb.base/sepdebug.exp: Replace usage of eq and ne
with [string compare].
2007-10-30 19:23:18 +00:00
Pedro Alves 84bc3db95d * gdb.base/sepdebug.exp (binfile): Add ${EXEEXT}.
* gdb.base/sepsymtab.exp (binfile): Add ${EXEEXT}.
2007-10-30 19:16:44 +00:00
Luis Machado 5876dc880e * gdb.opt/clobbered-registers-O2.c: New testcase source file.
* gdb.opt/clobbered-registers-O2.exp: New testcase expect file.
        * gdb.opt/Makefile.in: New makefile.
        * Makefile.in: Create new directory "gdb.opt".
        * configure.ac: Add "gdb.opt" directory.
        * configure: Regenerated.
2007-10-25 20:30:26 +00:00
Doug Evans c3ea9a1428 * gdb.cp/mb-ctor.exp: Check skip_cplus_tests.
* gdb.cp/mb-templates.exp: Check skip_cplus_tests.
2007-10-25 18:33:56 +00:00
Thiago Jung Bauermann 93004d61a6 2007-10-15 Wu Zhou <woodzltc@cn.ibm.com>
Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.base/dfp-exprs.exp: new file adding tests for Decimal
	Floating Point expressions.
	* gdb.base/dfp-test.exp: new file adding tests for Decimal
	Floating Point variables.
	* gdb.base/dfp-test.c: new file containing program with Decimal
	Floating variables, used by gdb.base/dfp-test.exp.
2007-10-25 18:09:45 +00:00
Daniel Jacobowitz 62a24a2b2b * gdb.threads/multi-create.c, gdb.threads/multi-create.exp: New. 2007-10-23 20:17:55 +00:00
Ulrich Weigand e7b1eae683 * gdb.arch/altivec-abi.exp (compile_flags): Use -mabi=altivec when
compiling test case with GCC.
	* gdb.arch/altivec-regs.exp (compile_flags): Likewise.
2007-10-21 12:28:00 +00:00
Ulrich Weigand c641edccb5 * gdb.arch/altivec-regs.exp (decimal_vector): Adjust for output
format changes.
2007-10-21 12:24:34 +00:00
Michael Snyder 5e5ebfe659 2007-10-18 Michael Snyder <msnyder@specifix.com>
* gdb.base/dbx.exp: Add missing "-re " operator.
2007-10-18 10:05:44 +00:00
Gaius Mulley e831e7b6ed * configure.ac: Added gdb.modula2/Makefile to AC_OUTPUT.
* configure.ac: Removed trailing spaces after backslash.
* gdb.modula2: New directory.
* gdb.modula2/Makefile.in: New file.
* gdb.modula2/unbounded-array.exp: New file.
* gdb.modula2/unbounded1.c: New file.
2007-10-16 17:28:56 +00:00
Daniel Jacobowitz 7cc46491b1 * NEWS: Document target described register support for PowerPC.
* ppc-tdep.h: Remove ppc_spr constants.
	(struct gdbarch_tdep): Remove regs, ppc_sr0_regnum, and
	ppc_builtin_type_vec128 members.
	(PPC_R0_REGNUM, PPC_F0_REGNUM, PPC_PC_REGNUM, PPC_MSR_REGNUM)
	(PPC_CR_REGNUM, PPC_LR_REGNUM, PPC_CTR_REGNUM, PPC_XER_REGNUM)
	(PPC_FPSCR_REGNUM, PPC_MQ_REGNUM, PPC_SPE_UPPER_GP0_REGNUM)
	(PPC_SPE_ACC_REGNUM, PPC_SPE_FSCR_REGNUM, PPC_VR0_REGNUM)
	(PPC_VSCR_REGNUM, PPC_VRSAVE_REGNUM, PPC_NUM_REGS): New constants.
	* rs6000-tdep.c: Include preparsed descriptions.
	(init_sim_regno_table): Do not iterate over pseudo registers.
	Look up segment registers by name.  Use sim_spr_register_name
	for SPRs.
	(rs6000_register_sim_regno): Call init_sim_regno_table here.
	(rs6000_builtin_type_vec128): Delete.
	(rs6000_register_name): Only handle SPE pseudo registers and upper
	halves.  Call tdesc_register_name for everything else.
	(rs6000_register_type): Delete.  Replace with...
	(rs6000_pseudo_register_type): ...this new function.  Only handle
	SPE pseudo registers.
	(rs6000_register_reggroup_p): Delete.  Replace with...
	(rs6000_pseudo_register_reggroup_p): ...this new function.  Only
	handle SPE pseudo registers.
	(rs6000_convert_register_p): Use ppc_fp0_regnum instead of
	"struct reg".
	(rs6000_register_to_value, rs6000_value_to_register): Remove check
	of reg->fpr.
	(e500_register_reggroup_p): Delete.
	(STR, R, R4, R8, R16, F, P8, R32, R64, R0, A4, S, S4, SN4, S64)
	(COMMON_UISA_REGS, PPC_UISA_SPRS, PPC_UISA_NOFP_SPRS)
	(PPC_SEGMENT_REGS, PPC_OEA_SPRS, PPC_ALTIVEC_REGS, PPC_SPE_GP_REGS)
	(PPC_SPE_UPPER_GP_REGS, PPC_EV_PSEUDO_REGS): Delete macros.
	(registers_powerpc, registers_403, registers_403GC, registers_505)
	(registers_860, registers_601, registers_602, registers_603)
	(registers_604, registers_750, registers_7400, registers_e500): Delete
	variables.
	(struct variant): Delete nregs, npregs, num_tot_regs, and regs.  Add
	tdesc.
	(tot_num_registers, num_registers, num_pseudo_registers): Delete.
	(variants): Delete outdated comment.  Use standard target descriptions
	instead of "struct reg" arrays.
	(init_variants): Delete.
	(rs6000_gdbarch_init): Do not guess word size from the BFD
	architecture if we have a target description.  Select a variant
	before creating a new architecture.  Use the variant's target
	description if the target did not define a register layout.
	Validate target-supplied registers.  Reject mismatches.  Use
	fixed register numbers and new constants instead of magic
	numbers.  Call set_gdbarch_ps_regnum.  Call tdesc_use_registers.
	(_initialize_rs6000_tdep): Initialize the preparsed target
	descriptions.
	* target-descriptions.c (tdesc_predefined_types): Add int128 and
	uint128.
	(tdesc_find_register_early): New function.
	(tdesc_numbered_register): Use it.
	(tdesc_register_size): New function.
	(tdesc_use_registers): Take a target_desc argument.  Do not use
	gdbarch_target_desc.
	* target-descriptions.h (tdesc_use_registers): Update prototype
	and comment.
	(tdesc_register_size): New prototype.
	* Makefile.in (powerpc_32_c, powerpc_403_c, powerpc_403gc_c)
	(powerpc_505_c, powerpc_601_c, powerpc_602_c, powerpc_603_c)
	(powerpc_604_c, powerpc_64_c, powerpc_7400_c, powerpc_750_c)
	(powerpc_860_c, powerpc_e500_c, rs6000_c): New macros.
	(rs6000-tdep.o): Update.
	* arm-tdep.c (arm_gdbarch_init): Update call to tdesc_use_registers.
	* m68k-tdep.c (m68k_gdbarch_init): Likewise.
	* mips-tdep.c (mips_gdbarch_init): Likewise.

	* gdb.texinfo (Predefined Target Types): Add int128
	and uint128.
	(Standard Target Features): Add PowerPC features.

	* gdb.xml/tdesc-regs.exp: Add PowerPC support.

	* sim-ppc.h (sim_spr_register_name): New prototype.

	* gdb-sim.c (regnum2spr): Rename to...
	(sim_spr_register_name): ... this.  Make global.
2007-10-15 19:45:31 +00:00
Pierre Muller 501b79c1d2 2007/10/15 Pierre Muller <muller@ics.u-strasbg.fr>
* gdb.base/sigstep.c (main): Add checks for
	return values for setitimer call.
	Call setitimer again with itimer = ITIMER_REAL
	if first call to setitimer fails.
2007-10-15 07:17:56 +00:00
Kazu Hirata e91528f055 * lib/gdb.exp (gdb_load_cmd): Print out $loadtimeout instead
of $timeout.
2007-10-11 20:08:01 +00:00
Daniel Jacobowitz 2ec9a4f8d1 * solib-svr4.c (enable_break): Add the dynamic linker also if
auxv succeeds.

	* gdb.server/server-run.exp: Test for dynamic linker symbols.
2007-10-09 17:59:01 +00:00
Pierre Muller 5aa7ddc2db 2007/10/09 Pierre Muller <muller@ics.u-strasbg.fr>
* lib/gdb.exp (gdb_run_cmd): Move comment outside
	of gdb_expect call, to avoid interruption.
2007-10-09 15:08:02 +00:00
Pedro Alves 64b2fa0474 2007-10-09 Pedro Alves <pedro_alves@portugalmail.pt>
* gdb.base/whatis.c (v_long_long, v_signed_long_long)
	(v_unsigned_long_long, v_long_long_array)
	(v_signed_long_long_array, v_unsigned_long_long_array)
	(slong_long_addr, a_slong_long_addr, v_long_long_pointer)
	(v_signed_long_long_pointer, v_unsigned_long_long_pointer)
	[!NO_LONG_LONG]: New.
	(t_struct, v_struct2, t_union, v_union2) [!NO_LONG_LONG]: Add
	v_long_long_member.

	(v_long_long_func, v_signed_long_long_func)
	(v_unsigned_long_long_func) [!NO_LONG_LONG]: New.
	(main) [!NO_LONG_LONG]: Initialize long long variants.

	* gdb.base/whatis.exp: If board file requests no_long_long, build
	test with NO_LONG_LONG defined.  Test long long, signed long long,
	and unsigned long long variants but only if board file doesn't
	disable it.
2007-10-08 23:15:55 +00:00
Daniel Jacobowitz a912286e38 2007-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
Daniel Jacobowitz  <dan@codesourcery.com>

	* Makefile.in (ALL_SUBDIRS): Add gdb.pascal.
	* configure.ac (AC_OUTPUT): Add gdb.pascal/Makefile.
	* configure: Regenerated.
	* gdb.pascal/Makefile.in, gdb.pascal/hello.exp, gdb.pascal/hello.pas,
	gdb.pascal/types.exp, lib/pascal.exp: New files.
2007-10-08 12:41:25 +00:00
Daniel Jacobowitz 471ba8c90c * gdb.cp/classes.exp (do_tests): Always step to the line after the
call.
	* gdb.mi/mi-simplerun.exp (test_controlled_execution): Allow finish
	to return to the call.
	* gdb.mi/mi2-simplerun.exp (test_controlled_execution): Likewise.
	* gdb.mi/mi-return.exp (test_return_simple): Likewise.
	* gdb.mi/mi2-return.exp (test_return_simple): Likewise.
	* gdb.mi/mi-until.exp (test_until): Likewise.
	* gdb.mi/mi2-until.exp (test_until): Likewise.
2007-10-02 14:57:46 +00:00
Daniel Jacobowitz fef8a650d0 * gdb.mi/var-cmd.c (do_locals_tests): Define lcharacter as a
two-char array.
	* gdb.mi/mi-var-cmd.exp, gdb.mi/mi2-var-cmd.exp: Use lcharacter[0].
2007-10-01 14:07:46 +00:00
Daniel Jacobowitz d983da9c3d 2007-09-16 Daniel Jacobowitz <dan@codesourcery.com>
Jeff Johnston  <jjohnstn@redhat.com>

	* breakpoint.c (watchpoints_triggered): New.
	(bpstat_stop_status): Remove STOPPED_BY_WATCHPOINT argument.
	Check watchpoint_triggered instead.  Combine handling for software
	and hardware watchpoints.  Do not use target_stopped_data_address
	here.  Always check a watchpoint if its scope breakpoint triggers.
	Do not stop for thread or overlay events.  Improve check for
	triggered watchpoints without a value change.
	(watch_command_1): Insert the scope breakpoint first.  Link the
	scope breakpoint to the watchpoint.
	* breakpoint.h (enum watchpoint_triggered): New.
	(struct breakpoint): Add watchpoint_triggered.
	(bpstat_stop_status): Update prototype.
	(watchpoints_triggered): Declare.
	* infrun.c (enum infwait_status): Add infwait_step_watch_state.
	(stepped_after_stopped_by_watchpoint): Delete.
	(handle_inferior_event): Make stepped_after_stopped_by_watchpoint
	local.  Handle infwait_step_watch_state.  Update calls to
	bpstat_stop_status.  Use watchpoints_triggered to check
	watchpoints.
	* remote.c (stepped_after_stopped_by_watchpoint): Remove extern.
	(remote_stopped_data_address): Do not check it.

	* gdb.texinfo (Setting Watchpoints): Adjust warning text about
	multi-threaded watchpoints.
	* gdbint.texinfo (Watchpoints): Describe how watchpoints are
	checked.  Describe sticky notification.  Expand description
	of steppable and continuable watchpoints.
	(Watchpoints and Threads): New subsection.

	* gdb.threads/watchthreads.c (thread_function): Sleep between
	iterations.
	* gdb.threads/watchthreads.exp: Allow two watchpoints to trigger
	at once for S/390.  Generate matching fails and passes.
2007-10-01 00:17:58 +00:00
Vladimir Prus 6902ff2f04 Undo this part of previous checkin:
* gdb.mi/mi2-var-child.exp: Step over said
     initialization.

It's not necessary, and breaks the test.
2007-09-27 12:44:08 +00:00
Vladimir Prus 17f62551fb * gdb.mi/var-cmd.c (do_children_tests): Initialize
the 'struct_declarations' variable to zeros.
        * gdb.mi/mi2-var-child.exp: Step over said
        initialization.
2007-09-27 12:25:20 +00:00
Vladimir Prus ed0616c6b7 * breakpoint.c (remove_sal): New.
(expand_line_sal_maybe): New.
	(create_breakpoints): Call expand_line_sal_maybe.
	(clear_command): Add comment.
	(breakpoint_re_set_one): Call expand_line_sal_maybe.
	* linespec.c (decode_indirect): Set explicit_pc to 1.
	(decode_all_digits): Set explicit_line to 1.
	(append_expanded_sal): New.
	(expand_line_sal): New.
	* linespec.h (expand_line_sal): Declare.
	* symtab.c (init_sal): Initialize explicit_pc
	and explicit_line.
	* symtab.h (struct symtab_and_line): New fields
	explicit_pc and explicit_line.
2007-09-24 07:40:32 +00:00
Daniel Jacobowitz 41f1b6975d * infcall.c (call_function_by_hand): Handle language-specific
pass and return by reference.

	* cp-abi.c (cp_pass_by_reference): New.
	* cp-abi.h (cp_pass_by_reference): Declare.
	(struct cp_abi_ops): Add pass_by_reference.
	* gnu-v3-abi.c (gnuv3_pass_by_reference): New.
	(init_gnuv3_ops): Set pass_by_reference.

	* language.c (language_pass_by_reference): New.
	(default_pass_by_reference): New.
	(unknown_language_defn, auto_language_defn, local_language_defn): Add
	default_pass_by_reference.
	* langauge.h (struct language_defn): Add la_pass_by_reference.
	(language_pass_by_reference, default_pass_by_reference): Declare.
	* ada-lang.c (ada_language_defn): Add default_pass_by_reference.
	* c-lang.c (c_language_defn, asm_language_defn)
	(minimal_language_defn): Likewise.
	(cplus_language_defn): Add cp_pass_by_reference.
	* f-lang.c (f_language_defn): Add default_pass_by_reference.
	* jv-lang.c (java_language_defn): Likewise.
	* m2-lang.c (m2_language_defn): Likewise.
	* objc-lang.c (objc_language_defn): Likewise.
	* p-lang.c (pascal_language_defn): Likewise.
	* scm-lang.c (scm_language_defn): Likewise

	* gdb.cp/pass-by-ref.cc, gdb.cp/pass-by-ref.exp: New files.
2007-09-23 16:25:06 +00:00
Pedro Alves 3f213f78ed * configure.ac: Do gdb.stabs tests by default on Cygwin and MinGW
targets.
	* configure: Regenerate.
2007-09-23 13:56:56 +00:00
Vladimir Prus 0d381245e3 * breakpoint.h (enum enable_state): Remove the
bp_shlib_disabled enumerator.
	(struct bp_location): New members shlib_disabled,
	global_next, enabled and function_name.
	Rename pending to condition_not_parsed.

	* breakpoint.c (ALL_BP_LOCATIONS): Iterate over global_next.
	(ALL_BP_LOCATIONS_SAFE): Likewise.
	(breakpoint_enabled): Don't check for pending.
	(condition_command): Free and update all locations of
	a breakpoint.
	(insert_bp_location): Adjust.
	(software_breakpoint_inserted_here_p): Don't care
	if breakpoint is enabled, as soon as it's inserted.
	(print_it_typical): Print bpstat's location, not
	bpstat's breakpoint's location.
	(bpstat_stop_status): Iterate over all locations, not
	all breakpoints.
	(print_breakpoint_location): New.
	(print_one_breakpoint): Renamed to
	(print_one_breakpoint_location): ...this. Take
	parameters to describe which location is being
	printed. Modify code to properly print header
	for several locations and individual locations.
	(print_one_breakpoint): Print all locations.
	(breakpoint_has_pc): New.
	(describe_other_breakpoints): Use the above.
	(check_duplicates): Renamed to...
	(check_duplicates_for): .. this.
	(check_duplicates): Use check_duplicates_for.
	(allocate_bp_location): Adjust.
	(set_raw_breakpoint_without_location): New,
	extracted from set_raw_breakpoint.
	(set_breakpoint_location_function): New.
	(set_raw_breakpoint): Use
	set_raw_breakpoint_without_location.
	(make_breakpoint_permanent): Mark all locations
	as inserted.
	(disable_breakpoints_in_shlibs): Iterate over
	locations.
	(disable_breakpoints_in_unloaded_shlib): Likewise.
	(re_enable_breakpoints_in_shlibs): Likewise.
	(mention): Say "pending" when breakpoint has
	zero locations.  If breakpoint has more than one
	location, say so.
	(add_location_to_breakpoint): New.
	(create_breakpoint): Accept symtabs_and_lines, not
	symtab_and_line. Pass extra sals to
	add_location_to_breakpoint.
	(create_breakpoints): Pass symtabs_and_lines to
	create_breakpoints.
	(break_command_1): Make pending breakpoints
	have zero locations.
	(do_captured_breakpoint): Remove wrong allocation.
	(clear_command): Iterate over all locations.
	(unlink_locations_from_global_list): Renamed
	from unlink_location_from_global_list. Remove
	all locations.
	(delete_breakpoint): Remove all locations.
	Iterate over all locations when deciding which
	other location to re-enable.
	(all_locations_are_pending): New.
	(update_breakpoint_locations): Renamed from
	update_breakpoint_location. Try to match old
	and new locations using names of containing
	functions.
	(breakpoint_re_set_one): Adjust.
	(find_location_by_number): New.
	(disable_command): Allow disabling individual location.
	(enable_command): Allow enabling individual location.
	* breakpoint.c: Adjust all uses of breakpoint's
	enable state to for bp_shlib_disabled change.
2007-09-23 07:56:22 +00:00
Vladimir Prus fe3f5fa8f9 * breakpoint.c (do_restore_lang_radix_cleanup): Remove.
(resolve_pending_breakpoint): Remove.
	(re_enable_breakpoints_in_shlibs): Remove.
	(unlink_locations_from_global_list): New.
	(update_breakpoint_locations): New.
	(breakpoint_re_set_one): Don't bail out on pending breakpoints.
	Use parse_condition and update_breakpoint_location to
	reset breakpoint.  Ignore 'symbol not found' error from
	decode_line_1.
	(breakpoint_re_set): Don't emit newline before the
	reason why breakpoint is not reset.
	(do_enable_breakpoint): Don't specially process pending
	breakpoints.
	(free_bp_location): New.
	(break_command_1): For pending breakpoints, initialize
	all fields of a sal with zeroes.
	* breakpoint.h (re_enable_breakpoints_in_shlibs): Remove.
	* infcmd.c (post_create_inferior): Don't call
	re_enable_breakpoints_in_shlibs.
	* infrun.c (handle_inferior_event): Likewise.
	* solib-irix.c (irix_solib_create_inferior_hook): Likewise.
	* solib-osf.c (osf_solib_create_inferior_hook): Likewise.
	* win32-nat.c (get_win32_debug_event): Likewise.
2007-09-22 19:33:32 +00:00
Daniel Jacobowitz a75cf6c00c * gdb.base/sepdebug.exp (test_different_dir): Append to pf_prefix. 2007-09-21 22:42:52 +00:00
Daniel Jacobowitz 18ecae3831 * schedlock.c (NUM): Change to 1.
(main): Use args[0] for the main thread.
	* schedlock.exp: Only expect two threads.  Only issue one pass or fail
	regardless of the number of threads.
2007-09-17 15:38:05 +00:00
Maciej W. Rozycki 4a543daf06 * gdb.mi/mi-watch.exp (test_watchpoint_all): Pass the watchpoint
type down.
(test_watchpoint_triggering): XFAIL the sw watchpoint scope
test.
* gdb.mi/mi2-watch.exp (test_watchpoint_all): Pass the
watchpoint type down.
(test_watchpoint_triggering): XFAIL the sw watchpoint scope
test.
2007-09-14 17:37:55 +00:00
Maciej W. Rozycki 5509918fe4 [mti-fix-scope]
* gdb.mi/mi-watch.exp (test_watchpoint_all): New function.
Move all the tests here and run them twice, once using software
watchpoints and once using hardware watchpoints.
* gdb.mi/mi2-watch.exp (test_watchpoint_all): Likewise.
2007-09-14 17:21:29 +00:00
Daniel Jacobowitz 40b5398770 * gdb.base/solib-weak.exp (do_test): Adjust the file names for each
test.
2007-09-12 15:12:53 +00:00
Mark Kettenis 8b3fc8d898 * lib/gdb.exp (build_id_debug_filename_get): Improve check for
build-id.
2007-09-09 22:25:31 +00:00
Mark Kettenis 695e2681dd * lib/gdb.exp (gdb_compile): OpenBSD doesn't need -dl, and doesn't
know about $ORIGIN.  Calculate output dir from $dest instead of
using ${objdir}/{$subdir}.
2007-09-09 22:19:15 +00:00
Mark Kettenis 58d69f2966 * gdb.base/gcore-buffer-overflow.exp: Check whether gdb supports
gcore, before continuing with the test.
2007-09-09 21:31:00 +00:00
Daniel Jacobowitz 3e34759906 * gdb.mi/mi2-watch.exp: Set can-use-hw-watchpoints to 0 if required.
* gdb.mi/mi-watch.exp: Likewise.
2007-09-06 23:25:41 +00:00
Daniel Jacobowitz b5d84f6ee2 Remove files missed from last commit. 2007-09-06 20:20:27 +00:00
Daniel Jacobowitz ea37ba0926 * NEWS: Update description of string changes. Mention print/s.
* c-valprint.c (textual_element_type): New.
	(c_val_print): Use it.  Do not skip address printing for pointers
	with a string format.
	(c_value_print): Doc update.
	* dwarf2read.c (read_array_type): Use make_vector_type.
	* gdbtypes.c (make_vector_type): New.
	(init_vector_type): Use it.
	(gdbtypes_post_init): Initialize builtin_true_unsigned_char.
	(_initialize_gdbtypes): Mark int8_t and uint8_t as TYPE_FLAG_NOTTEXT.
	* gdbtypes.h (struct builtin_type): Add builtin_true_unsigned_char.
	(TYPE_FLAG_NOTTEXT, TYPE_NOTTEXT): New.
	(make_vector_type): New.
	* printcmd.c (print_formatted): Only handle 's' and 'i' for examine.
	Call the language print routine for string format.
	(print_scalar_formatted): Call val_print for string format.  Handle
	unsigned original types for char format.
	(validate_format): Do not reject string format.
	* stabsread.c (read_type): Use make_vector_type.
	* xml-tdesc.c (tdesc_start_vector): Use init_vector_type.

	* gdb.texinfo (Output Formats): Update 'c' description.  Describe 's'.
	(Examining Memory): Update mentions of the 's' format.
	(Automatic Display): Likewise.

	* gdb.arch/i386-sse.exp: Do not expect character constants.
	* gdb.base/charsign.c, gdb.base/charsign.exp: Delete.
	* gdb.base/display.exp: Allow print/s.
	* gdb.base/printcmds.exp, gdb.base/setvar.exp: Revert signed
	and unsigned char array changes.
2007-09-05 00:51:49 +00:00
Daniel Jacobowitz 2025a643ef * printcmd.c (printf_command): Handle ptr_arg. Correct typo
in internal error message.

	* gdb.base/display.exp: Add tests for printf %p.
2007-09-04 14:18:47 +00:00
Pedro Alves 26669a2768 * gdb.base/unload.c (dlopen, dlsym): Use the TEXT macro to convert
the dll name to unicode.
2007-09-03 22:12:13 +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
Jan Kratochvil 4cf31eea6a * gdb.base/gcore-buffer-overflow.c, gdb.base/gcore-buffer-overflow.exp:
New files.
2007-09-02 14:03:58 +00:00
Jan Kratochvil 4935890f4d * lib/gdb.exp (build_id_debug_filename_get): New function.
* gdb.base/sepdebug.exp: Reflect the changes in the heading comment.
	Remove the generate DEBUG file for the future testcase runs.
	New testcase for the NT_GNU_BUILD_ID retrieval.
	Move the final testing step to ...
	(test_different_dir): ... a new function.
	New parameter XFAIL to XFAIL all the tests performed.
	New parameter TEST_DIFFERENT_DIR parametrizing the directory.
	New parameter TYPE to PF_PREFIX all the tests performed.
2007-09-01 08:16:16 +00:00
Vladimir Prus 02142340a0 Implement -var-info-path-expression.
* mi/mi-cmds.h (mi_cmd_var_info_path_expression):
	Declare.
	* mi/mi-cmds.c (mi_cmds): Register var-info-path-expression.
	* mi/mi-cmd-var.c (mi_cmd_var_info_path_expression): New.
	* varobj.c (struct varobj): New field 'path_expr'.
	(c_path_expr_of_child, cplus_path_expr_of_child)
	(java_path_expr_of_child): New.
	(struct language_specific): New field path_expr_of_child.
	(varobj_create): Initialize the path_expr field.
	(varobj_get_path_expr): New.
	(new_variable): Initialize the path_expr field.
	(free_variable): Free the path_expr field.
	(adjust_value_for_children_access): New parameter
	WAS_TYPE.
	(c_number_of_children): Adjust.
	(c_describe_child): New parameter CFULL_EXPRESSION.
	Compute full expression.
	(c_value_of_child, c_type_of_child): Adjust.
	(cplus_number_of_children): Adjust.
	(cplus_describe_child): New parameter CFULL_EXPRESSION.
	Compute full expression.
	(cplus_name_of_child, cplus_value_of_child)
	(cplus_type_of_child): Adjust.
	* varobj.h (varobj_get_path_expr): Declare.
2007-08-31 18:52:05 +00:00
Ulrich Weigand 36acd84edc ChangeLog gdb/:
* spu-tdep.c (spu_pointer_to_address): New function.
	(spu_integer_to_address): Likewise.
	(spu_gdbarch_init): Add spu_pointer_to_address and
	spu_integer_to_address to gdbarch.


ChangeLog gdb/testsuite/:

	* gdb.cp/cp-relocate.exp (add-symbol-file): Change addresses
	to fit into SPU Local Store memory.
2007-08-27 14:31:46 +00:00
Joel Brobecker a896d12139 * gdb.base/default.exp: Adjust the expected output of "info
warranty" after the switch to GPLv3.
2007-08-23 20:36:15 +00:00
Joel Brobecker 7b4336022e * lib/gdb.exp (default_gdb_init): Increase expect buffer size
to 30000 (from 20000).
2007-08-23 20:10:04 +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
Joel Brobecker a9762ec78a Switch the license of all .c files to GPLv3.
Switch the license of all .h files to GPLv3.
        Switch the license of all .cc files to GPLv3.
2007-08-23 18:08:50 +00:00
Joel Brobecker 5a0e3bd0ac * configure.ac: Switch license to GPLv3. 2007-08-23 17:58:44 +00:00
Joel Brobecker cc00619d4d Switch the licensing to GPLv3 for all .ads and .adb files. 2007-08-23 17:49:23 +00:00
Daniel Jacobowitz 8d26208a1e gdb/testsuite/
* gdb.base/callfuncs.exp (do_function_calls): Use t_double_int
	and t_int_double.
	* gdb.base/callfuncs.c (t_double_int, t_int_double): New.

	gdb/
	* mips-tdep.c (mips_n32n64_fp_arg_chunk_p): New.
	(mips_n32n64_push_dummy_call): Always increment float_argreg along
	with argreg.  Use mips_n32n64_fp_arg_chunk_p.
2007-08-22 15:13:04 +00:00
Joel Brobecker 4fcb9948bf * gdb.base/step-line.c: Switch license to GPL version 3, and
update copyright year.
        * gdb.base/step-line.inp: Likewise.
2007-08-18 02:13:15 +00:00
Joel Brobecker b9c34f673c * gdb.base/gdb1555.exp: Make expected output immune to formatting
changes inside gdb1555.c.
        * gdb.base/pending.exp: Likewise.
2007-08-18 01:21:42 +00:00
Daniel Jacobowitz 2cc176786d * config/default.exp: New file. 2007-08-13 14:35:59 +00:00
Daniel Jacobowitz e48883f791 * linespec.c (minsym_found): Advance to the next line if possible.
* gdb.base/prologue.c, gdb.base/prologue.exp: New.
	* lib/gdb.exp (gdb_breakpoint): Handle "temporary".
2007-07-31 19:58:40 +00:00
Maciej W. Rozycki 1ab80e5ba1 * gdb.base/dump.exp: Force the correct endianness for binary
formats not carrying this information.
2007-07-30 12:24:22 +00:00
Daniel Jacobowitz aba471f522 * gdb.threads/staticthreads.exp: Match .*sem_post. 2007-07-27 15:45:06 +00:00
Daniel Jacobowitz d4e0720445 * gdb.base/readline.exp (operate_and_get_next): Match the final
prompt.
2007-07-27 15:15:02 +00:00
Kevin Buettner 2b97317d48 * lib/mi-support.exp (mi_gdb_target_load): Do a "kill" prior
to restarting SID.
2007-07-23 22:53:27 +00:00
Kevin Buettner 44efa07abf * gdb.cp/ref-params.exp (gdb_start_again): Invoke `gdb_exit'
prior to `gdb_start'.
2007-07-19 00:46:45 +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 255e7678a9 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
Daniel Jacobowitz  <dan@codesourcery.com>

	* config/i386/cygwin.mt (TDEPFILES): Add solib-target.o.
	* coff-pe-read.c (read_pe_exported_syms): Delete verbose
	printf.
	* NEWS: Mention gdbserver DLL support.

	* gdb.base/unload.c (dlopen, dlsym, dlclose, dlerror): Define
	for __WIN32__.
	(SHLIB_NAME): Delete definition.  Always pass dlerror to fprintf.
	* gdb.base/unload.exp: Use shared library test routines.

	* inferiors.c (all_dlls, dlls_changed, get_dll): New.
	(add_thread): Minor cleanups.
	(clear_inferiors): Move lower in the file.  Clear the DLL
	list.
	(free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
	* remote-utils.c (prepare_resume_reply): Check dlls_changed.
	(xml_escape_text): New.
	* server.c (handle_query): Handle qXfer:libraries:read.  Report it
	for qSupported.
	(handle_v_cont): Report errors.
	(gdbserver_version): Update.
	(main): Correct size of own_buf.  Do not report initial DLL events.
	* server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
	(unloaded_dll, xml_escape_text): New.
	* win32-low.c (enum target_waitkind): Update comments.
	(win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
	(winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
	(win32_EnumProcessModules, win32_GetModuleInformation)
	(win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
	(winapi_CreateToolhelp32Snapshot, winapi_Module32First)
	(winapi_Module32Next, win32_CreateToolhelp32Snapshot)
	(win32_Module32First, win32_Module32Next, load_toolhelp)
	(toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
	(get_child_debug_event): Handle DLL events.
	(win32_wait): Likewise.
2007-07-17 12:51:41 +00:00
Ulrich Weigand 3a40aaa0eb 2007-07-03 Markus Deuling <deuling@de.ibm.com>
* cp-namespace.c (lookup_symbol_file): Add block to
	lookup_symbol_global call.
	* Makefile.in (solist_h): Add dependency on symtab header.
	(symtab.o): Add dependency on solist header.
	* solib.c (solib_global_lookup): New function.
	* solib-svr4.c (scan_dyntag): Likewise.
	(elf_locate_base): Call helper routine scan_dyntag.
	(elf_lookup_lib_symbol): New function.
	(_initialize_svr4_solib): Add elf_lookup_lib_symbol to svr4_so_ops.
	* solist.h (symtab.h): New include.
	(struct target_so_ops): New member lookup_lib_global_symbol.
	(solib_global_lookup): New prototype.
	* symtab.c: New include solist.h.
	(lookup_objfile_from_block): New function.
	(lookup_global_symbol_from_objfile): New function.
	(basic_lookup_symbol_nonlocal): Add block to lookup_symbol_global call.
	(lookup_symbol_global): Call library-specific lookup procedure.
	* symtab.h (lookup_global_symbol_from_objfile): New prototype.

	* NEWS: Document framework.

testsuite/

	* gdb.base/solib-symbol.exp: New file (testcase multiple symbol lookup).
	* gdb.base/solib-symbol-lib.c: Likewise.
	* gdb.base/solib-symbol-main.c: Likewise.
2007-07-03 12:14:44 +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
Daniel Jacobowitz 1b05479a47 2007-07-01 Daniel Jacobowitz <dan@codesourcery.com>
* top.c (gdb_readline_wrapper_line): Call rl_callback_handler_remove.
	(struct gdb_readline_wrapper_cleanup): Remove prompt_orig.
	(gdb_readline_wrapper_cleanup): Do not reset the prompt.
	(gdb_readline_wrapper): Do not save the prompt.  Pass our prompt
	to display_gdb_prompt.

2007-07-01  Nick Roberts  <nickrob@snap.net.nz>
	    Daniel Jacobowitz  <dan@codesourcery.com>

	* gdb.base/annota3.exp: Test for if construct.
2007-07-01 22:37:52 +00:00
Daniel Jacobowitz 86f78eb20c * gdb.base/chng-syms.exp: Handle glibc's __GI_exit. 2007-06-26 20:28:47 +00:00
Maciej W. Rozycki 6a2eb47454 gdb/:
* printcmd.c (do_one_display): If display/i, start with an initial
line feed to avoid bad layout if there is a branch delay slot.

gdb/testsuite/:
* gdb.base/display.exp: Allow a newline after display/i.
* gdb.base/pc-fp.exp: Likewise.
* gdb.base/sigbpt.exp: Likewise.
2007-06-21 15:26:05 +00:00
Daniel Jacobowitz f8b73d13b7 * Makefile.in (mips-tdep.o): Update.
* mips-tdep.c (struct register_alias, mips_o32_aliases)
	(mips_n32_n64_aliases, mips_register_aliases): New.
	(mips_register_name): Call tdesc_register_name.
	(mips_tdesc_register_reggroup_p): New.
	(mips_pseudo_register_type, value_of_mips_user_reg): New.
	(mips_gdbarch_init): Add target-described register support.
	Register aliases for register names.
	* target-descriptions.c (tdesc_register_name): Make global.
	(tdesc_register_in_reggroup_p): New function, broken out from
	tdesc_register_reggroup_p.
	(tdesc_register_reggroup_p): Use it.
	* target-descriptions.h (tdesc_register_name)
	(tdesc_register_in_reggroup_p): New prototypes.
	* NEWS: Correct formatting.  Mention MIPS register support.
	* features/mips-cp0.xml, features/mips-fpu.xml,
	features/mips64-cp0.xml, gdb/features/mips64-fpu.xml, mips-cpu.xml,
	features/mips64-cpu.xml: New files.

	* gdb.xml/tdesc-regs.exp: Add MIPS support.  Allow multiple
	required features to be included.

	* gdb.texinfo (MIPS Features): New subsection.
2007-06-13 18:27:00 +00:00
Daniel Jacobowitz 4339e69e64 * gdb.threads/manythreads.exp: Prevent expect buffer overflow
in info threads output.
2007-06-12 14:44:15 +00:00
Ulrich Weigand 23d964e7b6 * target.h (enum target_object): Add TARGET_OBJECT_SPU.
* spu-linux-nat.c (spu_xfer_partial): Handle TARGET_OBJECT_SPU.

	* spu-tdep.h (SPU_NUM_PSEUDO_REGS): Add 5 pseudo registers.
	(enum spu_regnum): Add SPU_FPSCR_REGNUM, SPU_SRR0_REGNUM,
	SPU_LSLR_REGNUM, SPU_DECR_REGNUM, SPU_DECR_STATUS_REGNUM.
	* spu-tdep.c (infospucmdlist): New variable.
	(spu_register_name): Handle additional pseudo registers.
	(spu_register_type): Likewise.
	(spu_pseudo_register_read): Likewise.
	(spu_pseudo_register_write): Likewise.
	(spu_pseudo_register_read_spu): New function.
	(spu_pseudo_register_write_spu): Likewise.
	(info_spu_event_command): New function.
	(info_spu_signal_command): Likewise.
	(info_spu_mailbox_list): Likewise.
	(info_spu_mailbox_command): Likewise.
	(spu_mfc_get_bitfield): Likewise.
	(info_spu_dma_cmdlist): Likewise.
	(info_spu_dma_command): Likewise.
	(info_spu_proxydma_command): Likewise.
	(info_spu_command): Likewise.
	(_initialize_spu_tdep): Install "info spu" commands.

testsuite/ChangeLog:

	* gdb.arch/spu-info.exp: New testcase.
	* gdb.arch/spu-info.c: New file.

doc/ChangeLog:

	* gdb.texinfo (Architectures): Add new SPU section to document
	Cell Broadband Engine SPU architecture specific commands.
2007-06-12 14:35:26 +00:00
Daniel Jacobowitz fd20f75b0c * gdb.arch/thumb-prologue.c: Record the breakpoint address in
tpcs_offset.  Restore lr after the call.
	* gdb.arch/thumb-prologue.exp: Use tpcs_offset.
2007-06-05 18:50:41 +00:00
Daniel Jacobowitz 2226f861d2 * lib/gdbserver-support.exp (gdbserver_spawn): Only match full_buffer.
(gdbserver_run): Kill any running gdbserver.
	* lib/mi-support.exp (mi_gdb_target_load): Likewise.
2007-05-23 12:41:14 +00:00
Maciej W. Rozycki d12371a9bc * gdb.base/sigbpt.exp: Preset segv_addr. 2007-05-17 12:09:31 +00:00
Daniel Jacobowitz 93f02886fd * lib/gdb.exp (gdb_compile): Add support for Windows DLLs.
(gdb_compile_shlib): Likewise.
	(skip_shlib_tests, gdb_download, gdb_load_shlibs): New.
	(default_gdb_init): Clear cleanfiles.
	(gdb_finish): Delete recorded cleanfiles.
	* lib/gdbserver-support.exp (gdbserver_spawn): Use gdb_download.

	* gdb.base/gdb1555.exp: Use skip_shlib_tests and gdb_load_shlibs.
	Do not use isnative.
	* gdb.base/pending.exp, gdb.base/shlib-call.exp, gdb.base/shreloc.exp,
	gdb.base/so-impl-ld.exp: Likewise.
	* gdb.base/solib-weak.exp: Likewise.  Skip for DLL targets.
	* gdb.base/unload.exp: Likewise.  Do not pass empty option to
	gdb_compile.
2007-05-16 14:21:47 +00:00
Vladimir Prus b04e06d776 * config/unknown.exp: Remove. 2007-05-15 17:06:41 +00:00
Ulrich Weigand 069ed93115 2007-05-15 Markus Deuling <deuling@de.ibm.com>
* gdb.base/info-proc.exp: Check is_remote.
2007-05-15 13:18:09 +00:00
Ulrich Weigand 09db0d03ed 2007-05-14 Markus Deuling <deuling@de.ibm.com>
* gdb.base/gcore.exp: Initialize variable core_supported.
2007-05-14 21:04:15 +00:00
Daniel Jacobowitz af2cbe8c98 * gdb.threads/linux-dp.exp: Allow non-hexadecimal IDs also. 2007-05-14 16:56:07 +00:00
Daniel Jacobowitz 027c0295d8 * linux-thread-db.c (thread_db_pid_to_str): Print thread IDs
as hexadecimal.

	* gdb.threads/linux-dp.exp: Expect hexadecimal thread IDs.
	* gdb.threads/print-threads.exp (test_all_threads): Allow
	negative and hexadecimal thread IDs.
2007-05-14 16:52:13 +00:00
Daniel Jacobowitz dc5000e721 * jv-exp.y (push_fieldnames): Use STRUCTOP_PTR instead of
STRUCTOP_STRUCT.
	* jv-lang.c (evaluate_subexp_java): Handle STRUCTOP_PTR instead of
	STRUCTOP_STRUCT.
	* jv-typeprint.c (java_print_type): Do not crash on NULL varstring.

	* gdb.java/jprint.java (public): Avoid invalid call to static
	method.
2007-05-14 16:44:27 +00:00
Denis Pilat 2e74ed1804 2007-05-14 Denis Pilat <denis.pilat@st.com>
* gdb.mi/mi-console.exp, gdb.mi/gdb669.exp, gdb.mi/mi-cli.exp,
	gdb.mi/mi-regs.exp, gdb.mi/mi-stepi.exp, gdb.mi/mi-syn-frame.exp,
	gdb.mi/mi2-cli.exp, gdb.mi/mi2-console.exp, gdb.mi/mi2-disassemble.exp,
	gdb.mi/mi2-regs.exp, gdb.mi/mi2-stepi.exp, gdb.mi/mi-disassemble.exp,
	gdb.mi/mi2-syn-frame.exp: Remove commands already run in mi_run_to_main.
2007-05-14 08:14:05 +00:00
Ulrich Weigand 83547f02b7 * gdb.base/overlays.exp: Add support for targets with only code
overlay support, not data overlay.  Support spu-*-* target in
	this mode.
	* gdb.base/ovlymgr.c: Provide stubs for spu target.
	* gdb.base/spu.ld: New file.
2007-05-11 20:00:29 +00:00
Daniel Jacobowitz b18be20d0a * Makefile.in (c-lang.o, gnu-v3-abi.o): Update.
* NEWS: Mention improved C++ thunk support.
	* c-lang.c (cplus_language_defn): Mention cplus_skip_trampoline.
	* cp-abi.c (cplus_skip_trampoline): New.
	* cp-abi.h (cplus_skip_trampoline): New prototype.
	(struct cp_abi_ops): Add skip_trampoline member.
	* gnu-v3-abi.c (gnuv3_skip_trampoline): New.
	(init_gnuv3_ops): Set skip_trampoline.

	* gdb.cp/virtfunc.exp (proc do_tests): Test stepping through a thunk.
2007-05-07 11:49:05 +00:00
Daniel Jacobowitz be44485822 * gdb.fortran/complex.exp, gdb.fortran/complex.f: New files. 2007-05-07 01:11:31 +00:00
Daniel Jacobowitz b1d53152e0 * gdb.java/jmain.exp: Handle demangled names with and without method
signatures.
2007-04-29 17:13:57 +00:00
Daniel Jacobowitz d084b3317a * gdb.mi/mi-syn-frame.c (main, foo, bar)
(have_a_very_merry_interrupt): Remove calls to puts.
	* gdb.mi/mi-syn-frame.exp, gdb.mi/mi2-syn-frame.exp: Do not expect
	inferior output.
	* lib/mi-support.exp (mi_gdb_test): Check gdb,noinferiorio.  Correct
	test names.
2007-04-29 16:20:50 +00:00
Daniel Jacobowitz db9d7fc570 * gdb.base/auxv.exp (core_works): Also check is_remote.
* gdb.base/checkpoint.exp, gdb.base/multi-forks.exp: Likewise.
2007-04-29 15:48:46 +00:00
Vladimir Prus ef783a7dfc * gdb.base/sigaltstack.exp: Use 'srcfile' in error
message, not the undefined 'module' variable.
	* gdb.base/siginfo.exp: Likewise.
	* gdb.base/sigstep.exp: Likewise.
	* lib/gdbserver-support.exp (gdb_target_cmd): Quote
	serialport.
	* lib/mi-support.exp (mi_gdb_target_cmd): Likewise.
2007-04-25 15:56:15 +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
Denis Pilat 7d90fdfa95 2007-04-16 Denis Pilat <denis.pilat@st.com>
* gdb.base/setshow.exp: Reset height after having set it to 100.
2007-04-16 12:13:16 +00:00
Denis Pilat 5d3e9c8525 2007-04-16 Denis Pilat <denis.pilat@st.com>
* gdb.mi/mi2-stack.exp: update from mi-stack.exp.
2007-04-16 12:06:22 +00:00
Denis Pilat 18e7596947 2007-04-16 Denis Pilat <denis.pilat@st.com>
* gdb.mi/mi2-var-display.exp: Test for the fullname field.
2007-04-16 12:02:31 +00:00
Vladimir Prus 25d5ea921b * varobj.h (varobj_set_frozen): New
(varobj_get_frozen): New.
        (varobj_update): New parameter explicit.
        * varobj.c (struct varobj): New fields frozen
        and not_fetched.
        (varobj_set_frozen, varobj_get_frozen): New.
        (install_new_value): Don't fetch values for
        frozen variable object, or children thereof.  Allow
        a frozen variable object to have non-fetched value.
        (varobj_update): Allow updating child variables.
        Don't traverse frozen children.
        (new_variable): Initialize the frozen field.
        (c_value_of_variable): Return NULL for frozen
        variable without any value yet.
        * mi/mi-cmd-var.c (varobj_update_one): New parameter
        'explicit'.
        (mi_cmd_var_create): Output the 'frozen' field,
        as soon as testsuite is adjusted to expect that field.
        (mi_cmd_var_set_frozen): New.
        (mi_cmd_var_update): Pass the 'explicit' parameter to
        varobj_update_one.
        * mi/mi-cmds.c (mi_cmds): Register '-var-set-frozen'.
        * mi/mi-cmds.h (mi_cmd_var_set_frozen): Declare.
2007-04-14 09:51:30 +00:00
Jan Kratochvil 0b49cb802f * gdb.base/type-opaque-lib.c, gdb.base/type-opaque-main.c,
gdb.base/type-opaque.exp: New files.
2007-04-11 16:03:59 +00:00
Vladimir Prus a73bafbcaa * gdb.mi/mi-var-child.c
(do_children_tests): User char[2] instead of
        char so that automatic printing of pointers to char
        don't give unpredicable result.
        * gdb.mi/var-cmd.c (do_locals_test): Initialize
        local variables.
        * gdb.mi/mi-var-child.exp: Step to right line
        of do_children_tests.
        * gdb.mi/mi2-var-child.exp: Likewise.
        * gdb.mi/mi-var-cmd.exp: Step to right line of
        do_locals_tests.
        (do_children_tests): User char[2] instead of
        char so that automatic printing of pointers to char
        don't give unpredicable result.
        * gdb.mi/mi2-var-cmd.exp: Likewise.
        * lib/mi-support.exp (mi_continue_to_line):
        Pass test name to mi_wait_for_stop.
2007-04-01 15:27:26 +00:00
Daniel Jacobowitz 7ce5900041 * MAINTAINERS: Remove d10v entry.
* Makefile.in (SFILES): Remove dwarfread.c.
	(COMMON_OBS): Remove dwarfread.o.
	(gdb_sim_d10v_h, abug-rom.o, cpu32bug-rom.o, d10v-tdep.o, dwarfread.o)
	(remote-est.o, rom68k-rom.o): Delete.
	* NEWS: Mention removal of d10v, target abug, target cpu32bug,
	target est, target rom68k, and DWARF 1.
	* configure.tgt: Mark d10v as removed.
	* dwarf2read.c: Doc update.
	* elfread.c (struct elfinfo): Remove dboffset, dbsize, lnoffset,
	and lnsize.
	(elf_locate_sections): Do not set them.
	(elf_symfile_read): Do not call dwarf_build_psymtabs.
	* symfile.h (dwarf_build_psymtabs): Delete prototype.
	* config/m68k/monitor.mt (TDEPFILES): Prune.
	* abug-rom.c, cpu32bug-rom.c, d10v-tdep.c, dwarfread.c,
	remote-est.c, rom68k-rom.c, config/d10v/d10v.mt: Delete.

	* gdb.texinfo (M68K): Remove obsolete ROM monitors.
	* gdbint.texinfo (DWARF 1): Delete section and other dwarfread.c
	references.

	* gdb.asm/asm-source.exp: Remove d10v case.
	* lib/gdb.exp (skip_cplus_tests): Likewise.
	* gdb.asm/d10v.inc: Deleted.
2007-03-30 17:21:48 +00:00
Daniel Jacobowitz 203890574d * doublest.c (convert_floatformat_to_doublest): Use
floatformat_classify.
	(floatformat_is_nan): Rename to...
	(floatformat_classify): ...this.  Return more information.
	* doublest.h (enum float_kind): New.
	(floatformat_is_nan): Replace prototype...
	(floatformat_classify): ...with this one.
	* valprint.c (print_floating): Use floatformat_classify.  Handle
	infinity.

	* gdb.base/infnan.c, gdb.base/infnan.exp: New files.
2007-03-30 14:31:44 +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
Joel Brobecker aa3edb8ea1 * gdb.dwarf2/dw2-noloc.S: New file.
* gdb.dwarf2/dw2-noloc.exp: New file.
2007-03-29 19:03:56 +00:00
Pedro Alves 297561aca9 * gdb.cp/method2.cc: New test.
* gdb.cp/method2.exp: New test.
	* gdb.cp/Makefile.in (EXECUTABLES): Add method2.
2007-03-28 00:32:41 +00:00
Daniel Jacobowitz 1f81bd395c * gdb.ada/exec_changed.exp: Avoid "set confirm off". 2007-03-27 18:47:58 +00:00
Daniel Jacobowitz 9453113a8d Add "make pdf" and "make install-pdf", from Brooks Moses
<brooks.moses@codesourcery.com>.
2007-03-27 18:09:36 +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
Maciej W. Rozycki 446ab5859f * gdb.base/sigbpt.exp: Fix the message when skipping test.
* gdb.base/signull.exp: Similarly.
2007-03-23 12:41:18 +00:00
Ulrich Weigand bbb88ebfcf * lib/gdb.exp (gdb_run_cmd): Use -notransfer to make start-up
messages available to test cases (like chng-sym.exp).
2007-03-16 15:29:00 +00:00
Andreas Schwab cb8c4a990b * gdb.arch/altivec-regs.exp (decimal_vector): Adjust for output
format changes.
2007-03-14 15:15:37 +00:00
Daniel Jacobowitz 4e463ff545 * rs6000-tdep.c (rs6000_skip_prologue): Use skip_prologue_using_sal.
(rs6000_in_function_epilogue_p): Use extract_unsigned_integer.
	(refine_prologue_limit): Delete.
	(skip_prologue): Don't call it.  Use extract_unsigned_integer.
	Assume lim_pc is set.  Correct check for incomplete prologues.
	Do not skip clobbers of the frame pointer.
	* symtab.c (skip_prologue_using_sal): Fail if there is only one
	sal.

	* gdb.arch/powerpc-prologue.c (optimized_1_marker, gdb2029_marker)
	(optimized_1): New.
	(main): Call optimized_1.
	(gdb2029): Correct typos.  Call gdb2029_marker.
	* gdb.arch/powerpc-prologue.exp: Run new test.  Use a breakpoint
	for gdb2029.
2007-03-13 17:34:23 +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
Ulrich Weigand 70ed37372e * gdb.base/long_long.exp: Accept optional symbol name in <...>
for /a format output.
2007-03-10 01:13:43 +00:00
Daniel Jacobowitz 47b67b6080 * gdb.base/checkpoint.exp: Rewrite 600 checkpoint test to
collect output incrementally.
2007-03-09 15:20:16 +00:00
Ulrich Weigand b8953b0e7e * gdb.mi/mi-var-cmd.exp: Allow value without "..." string
for -var-create lpcharacter test.
	* gdb.mi/mi2-var-cmd.exp: Likewise.
2007-03-09 02:20:04 +00:00
Ulrich Weigand 7acd5c40d2 * gdb.mi/mi-var-cmd.exp: Allow -var-update null_ptr test to
pass on targets where address zero is readable.
2007-03-09 01:14:12 +00:00
Ulrich Weigand 9c6759c1a1 * gdb.xml/tdesc-arch.exp: Test is unsupported on target with
just a single architecture.
2007-03-09 00:14:07 +00:00
Ulrich Weigand a2f1aeb4a0 * gdb.base/callfuncs.exp (do_get_all_registers): Remove.
(fetch_all_registers): New function, uses gdb_test_multiple and
	exp_continue to fetch inferior output line-by-line.
	Replace all uses of do_get_all_registers by fetch_all_registers.
2007-03-08 20:08:02 +00:00
Ulrich Weigand 46579ac2da * gdb.base/relativedebug.exp: Skip test if gdb,nosignals is set
in target_info.
2007-03-08 17:59:13 +00:00
Michael Snyder fc133f2406 2007-03-02 Michael Snyder <michael.snyder@palmsource.com>
* gdb.threads/manythreads.exp: Use $message string for
	consistancy; add a default (timeout) case.
2007-03-02 22:16:06 +00:00
Michael Snyder 7646a51d49 2007-03-02 Michael Snyder <michael.snyder@palmsource.com>
* gdb.base/watchpoint.exp: Fix truncated comment.
2007-03-02 22:11:15 +00:00
Michael Snyder dcfff61f44 2007-03-02 Michael Snyder <michael.snyder@palmsource.com>
* Makefile.in: Remove spurious single-quotes from sed command.
2007-03-02 18:42:40 +00:00
Daniel Jacobowitz 664e3ee9c3 * gdb.mi/mi-var-cmd.exp: Correct test name. Allow any value for
func.
	* gdb.mi/mi2-var-cmd.exp: Likewise.
2007-02-28 17:32:51 +00:00