Commit Graph

3029 Commits

Author SHA1 Message Date
Nick Roberts 55f996a733 *** empty log message *** 2008-05-20 21:10:31 +00:00
Ulrich Weigand 907fc20268 gdb/
2008-05-15  Pedro Alves  <pedro@codesourcery.com>
	    Ulrich Weigand  <uweigand@de.ibm.com>

	* minsyms.c (lookup_minimal_symbol_by_pc_name): New function.
	* symtab.h (lookup_minimal_symbol_by_pc_name): Add prototype.

	* symtab.c (fixup_section): Remove prototype.  Add ADDR parameter;
	use it instead of ginfo->value.address.  Look up minimal symbol by
	address and name.  Assume OBJFILE is non-NULL.
	(fixup_symbol_section): Ensure we always have an objfile to look
	into.  Extract and pass to fixup_section the symbol's address that
	will match the minimal symbol's address.
	(fixup_psymbol_section): Likewise.

	(find_pc_sect_psymtab): Fall back to non-addrmap case when debugging
	overlays and the addrmap returned the wrong section.

	* dwarf2read.c (var_decode_location): Set SYMBOL_CLASS before
	calling fixup_symbol_section.


gdb/testsuite/

2008-05-15  Pedro Alves  <pedro@codesourcery.com>

	* gdb.base/fixsection.exp: New file.
	* gdb.base/fixsection0.c: New file.
	* gdb.base/fixsection1.c: New file.
2008-05-16 12:58:49 +00:00
Ulrich Weigand e8f972703a * gdb.base/annota1.exp: Accept printf@... in place of printf.
* gdb.base/annota3.exp: Likewise.
2008-05-16 12:48:08 +00:00
Nathan Froyd ac0bb574ab * gdb.base/watch_thread_num.exp: Don't run tests that require
watchpoints if the target doesn't support them.
2008-05-13 21:17:18 +00:00
Doug Evans 6fadd07a48 * lib/gdbserver-support.exp (find_gdbserver): Use $GDBSERVER if set. 2008-05-12 17:25:28 +00:00
Joel Brobecker 6e9a4a305b * gdb.ada/assign_1.exp: New testcase. 2008-05-09 23:51:40 +00:00
Doug Evans de90ada150 update for capitalization changes 2008-05-09 18:51:07 +00:00
Doug Evans a3c83fae41 remove cruft from previous checkin 2008-05-09 18:08:56 +00:00
Doug Evans 08388c79d5 New "find" command.
* NEWS: Document find command and qSearch:memory packet.
	* Makefile.in (SFILES): Add findcmd.c.
	(COMMON_OBJS): Add findcmd.o.
	(findcmd.o): New rule.
	* findcmd.c: New file.
	* target.h (target_ops): New member to_search_memory.
	(simple_search_memory): Declare.
	(target_search_memory): Declare.
	* target.c (simple_search_memory): New fn.
	(target_search_memory): New fn.
	* remote.c (PACKET_qSearch_memory): New packet kind.
	(remote_search_memory): New fn.
	(init_remote_ops): Init to_search_memory.
	(init_extended_remote_ops): Ditto.
	(_initialize_remote): Add qSearch:memory packet config command.

	* gdbserver/server.h (decode_search_memory_packet): Declare.
	* gdbserver/remote-utils.c (decode_search_memory_packet): New fn.
	* gdbserver/server.c (handle_search_memory_1): New fn.
	(handle_search_memory): New fn.
	(handle_query): Process qSearch:memory packets.

	* doc/gdb.texinfo: Document "find" command, qSearch:memory packet.

	* testsuite/gdb.base/find.exp: New file.
	* testsuite/gdb.base/find.c: New file.
2008-05-09 17:02:03 +00:00
Daniel Jacobowitz bd5ddfe865 * gdb.base/commands.exp (watchpoint_command_test): Handle
gdb,no_hardware_watchpoints.
	* gdb.base/float.exp: Allow ARM targets without floating point.
	* gdb.base/step-test.exp: Allow callee@plt when stepping in.
2008-05-08 16:30:53 +00:00
Joel Brobecker b5dd68e231 * gdb.ada/lang_switch: New test program.
* gdb.ada/lang_switch.exp: New testcase.
2008-05-06 21:37:32 +00:00
Doug Evans 382d13d1ca * gdb.base/help.exp (disassemble): Update expected help text. 2008-05-05 22:54:49 +00:00
Pedro Alves 9dd789d040 * gdb.base/longjmp.c, gdb.base/longjmp.exp: New files. 2008-05-04 19:43:31 +00:00
Pedro Alves 611c83ae47 gdb/
* breakpoint.c (update_breakpoints_after_exec): Delete bp_longjmp
	and bp_longjmp_resume breakpoints.
	(breakpoint_address_is_meaningful): Claim bp_longjmp_resume as
	meaningful.
	(create_longjmp_breakpoint): Don't create bp_longjmp_resume
	breakpoints.  Create bp_longjmp breakpoints as momentary
	breakpoints.
	(enable_longjmp_breakpoint): Delete.
	(set_longjmp_breakpoint): New.
	(disable_longjmp_breakpoint): Delete.
	(delete_longjmp_breakpoint): New.
	(set_longjmp_resume_breakpoint): Delete.
	(set_momentary_breakpoint_at_pc): New.
	(breakpoint_re_set_one): Don't delete bp_longjmp and
	bp_longjmp_resume breakpoints.
	(breakpoint_re_set): Don't create longjmp and longjmp-resume
	breakpoints.

	* infrun.c (step_resume_breakpoint): Add comment.
	(struct execution_control_state): Delete handling_longjmp member.
	(init_execution_control_state). Don't clear handling_longjmp.
	(context_switch): Don't context switch handling_longjmp.
	(handle_inferior_event): If handling a bp_longjmp breakpoint,
	create a bp_longjmp_resume breakpoint, and set it as current
	step_resume_breakpoint, then step over the longjmp breakpoint.  If
	handling a bp_longjmp_resume breakpoint, don't delete the longjmp
	breakpoint, delete the longjmp-resume breakpoint, and stop
	stepping.
	(currently_stepping): Remove handling_longjmp from expression.
	(insert_step_resume_breakpoint_at_sal): Update comment.
	(insert_longjmp_resume_breakpoint): New.

	* breakpoint.h (set_momentary_breakpoint_at_pc): Declare.
	(enable_longjmp_breakpoint, disable_longjmp_breakpoint): Delete
	declarations.
	(set_longjmp_breakpoint, delete_longjmp_breakpoint): Declare.
	(set_longjmp_resume_breakpoint): Delete declaration.

	* gdbthread.h (save_infrun_state): Remove handling_longjmp
	parameter.
	(load_infrun_state): Delete *handling_longjmp parameter.
	* thread.c (save_infrun_state): Remove handling_longjmp parameter.
	Update body.
	(load_infrun_state): Delete *handling_longjmp parameter.  Update
	body.

	* infcmd.c (disable_longjmp_breakpoint_cleanup): Delete.
	(delete_longjmp_breakpoint_cleanup): New.
	(step_1): Call set_longjmp_breakpoint instead of
	enable_longjmp_breakpoint.  Use delete_longjmp_breakpoint_cleanup
	instead of disable_longjmp_breakpoint_cleanup when making cleanup.
	(step_1_continuation): Pass thread id in the continuation args to
	step_once.
	(step_once): Add thread parameter.  Pass thread id the the
	continuation.

gdb/testsuite/
	* gdb.cp/annota2.exp: Adjust to breakpoints invalidations at
	different times.
2008-05-04 19:39:00 +00:00
Jan Kratochvil ff013f42f4 gdb/
* Makefile.in: Update dependencies.
	* dwarf2read.c: Include "addrmap.h"
	(struct dwarf2_cu): New fields RANGES_OFFSET and HAS_RANGES_OFFSET.
	(dwarf2_ranges_read): New prototype.
	(dwarf2_build_psymtabs_hard): Initialize and prepare PSYMTABS_ADDRMAP.
	Add discontiguous range to PSYMTABS_ADDRMAP by DWARF2_RANGES_READ on
	HAS_RANGES_OFFSET, otherwise add there the contiguous range.
	(dwarf2_ranges_read): New parameter RANGES_PST, update the function
	comment for it.  Add the found ranges to RANGES_PST.  New variable
	BASEADDR, initialize it the common way.
	(dwarf2_get_pc_bounds): Update the caller for the new parameter.
	(read_partial_die): `DW_AT_ranges' now only sets RANGES_OFFSET and
	HAS_RANGES_OFFSET for the later processing.
	* objfiles.h (struct objfile): New field PSYMTABS_ADDRMAP.
	* symtab.c: Include "addrmap.h"
	(find_pc_sect_psymtab): Support reading the field PSYMTABS_ADDRMAP.
	Move the psymtab locator into ...
	(find_pc_sect_psymtab_closer): ... a new function.

	gdb/testsuite/
	* gdb.dwarf2/dw2-ranges.S: Merge the secondary section with `.fini'.
	* gdb.dwarf2/dw2-ranges.exp: Compile also `dw2-ranges2.S' and
	`dw2-ranges3.S' and test also their MAIN2, FUNC2 and MAIN3 symbols.
	* gdb.dwarf2/dw2-ranges2.S, gdb.dwarf2/dw2-ranges3.S: New files.
2008-05-04 17:27:01 +00:00
Vladimir Prus 96dff6a2f4 * lib/mi-support.exp (mi_run_cmd): Allow for =thread-created
notification to appear.
2008-05-04 12:15:54 +00:00
Daniel Jacobowitz 55cd6f92dc * gdb.base/fullname.c: New file.
* gdb.base/fullname.exp: New file.
	* lib/gdb.exp (gdb_breakpoint): Support no-message option.
2008-05-04 04:04:11 +00:00
Pedro Alves d705c43c5a gdb/
* parse.c (parse_exp_in_context): Don't override
	expression_context_pc if get_selected_block returned a valid
	block.

	gdb/testsuite/
	* gdb.base/macscp.exp, gdb.base/macscp1.c: Add test for printing
	expressions with macros.
2008-05-03 22:30:51 +00:00
Jan Kratochvil 333222e127 * gdb.base/dfp-test.exp: Fix random FAIL risk on calling functions. 2008-05-03 21:56:38 +00:00
Daniel Jacobowitz 5ac016828d * gdb.base/completion.exp: Handle lack of other symbols beginning
with "a".

	* gdb.base/varargs.exp: Correct quoting for options to gdb_compile.
2008-05-02 20:30:49 +00:00
Pedro Alves 237fc4c9cd Implement displaced stepping.
gdb/
	* gdbarch.sh (max_insn_length): New 'variable'.
	(displaced_step_copy, displaced_step_fixup)
	(displaced_step_free_closure, displaced_step_location): New
	functions.
	(struct displaced_step_closure): Add forward declaration.
	* gdbarch.c, gdbarch.h: Regenerated.

	* arch-utils.c: #include "objfiles.h".
	(simple_displaced_step_copy_insn)
	(simple_displaced_step_free_closure)
	(displaced_step_at_entry_point): New functions.
	* arch-utils.h (simple_displaced_step_copy_insn)
	(simple_displaced_step_free_closure)
	(displaced_step_at_entry_point): New prototypes.

	* i386-tdep.c (I386_MAX_INSN_LEN): Rename to...
	(I386_MAX_MATCHED_INSN_LEN): ... this.
	(i386_absolute_jmp_p, i386_absolute_call_p)
	(i386_ret_p, i386_call_p, i386_breakpoint_p, i386_syscall_p)
	(i386_displaced_step_fixup): New functions.
	(struct i386_insn, i386_match_insn): Update.
	(i386_gdbarch_init): Set gdbarch_max_insn_length.
	* i386-tdep.h (I386_MAX_INSN_LEN): New.
	(i386_displaced_step_fixup): New prototype.
	* i386-linux-tdep.c (i386_linux_init_abi): Include "arch-utils.h".
	Register gdbarch_displaced_step_copy,
	gdbarch_displaced_step_fixup, gdbarch_displaced_step_free_closure,
	and gdbarch_displaced_step_location functions.

	* infrun.c (debug_displaced): New variable.
	(show_debug_displaced): New function.
	(struct displaced_step_request): New struct.
	(displaced_step_request_queue, displaced_step_ptid)
	(displaced_step_gdbarch, displaced_step_closure)
	(displaced_step_original, displaced_step_copy)
	(displaced_step_saved_copy, can_use_displaced_stepping): New
	variables.
	(show_can_use_displaced_stepping, use_displaced_stepping)
	(displaced_step_clear, cleanup_displaced_step_closure)
	(displaced_step_dump_bytes, displaced_step_prepare)
	(displaced_step_clear_cleanup, write_memory_ptid)
	(displaced_step_fixup): New functions.
	(resume): Call displaced_step_prepare.
	(proceed): Call read_pc once, and remember the value.  If using
	displaced stepping, don't remove breakpoints.
	(handle_inferior_event): Call displaced_step_fixup.  Add some
	debugging output.  When we try to step over a breakpoint, but get
	a signal to deliver to the thread instead, ensure the step-resume
	breakpoint is actually inserted.  If a thread hop is needed, and
	displaced stepping is enabled, don't remove breakpoints.
	(init_wait_for_inferior): Call displaced_step_clear.
	(_initialize_infrun): Add "set debug displaced" command.  Add
	"maint set can-use-displaced-stepping" command.  Clear
	displaced_step_ptid.
	* inferior.h (debug_displaced): Declare variable.
	(displaced_step_dump_bytes): Declare function.

	* Makefile.in (arch-utils.o, i386-linux-tdep.o): Update
	dependencies.

	gdb/testsuite/
	* gdb.asm/asmsrc1.s: Add scratch space.

	gdb/doc/
	* gdb.texinfo (Debugging Output): Document "set/show debug
	displaced".
	(Maintenance Commands): Document "maint set/show
	can-use-displaced-stepping".
2008-05-02 16:49:54 +00:00
Daniel Jacobowitz a0ef42744d 2008-05-01 Daniel Jacobowitz <dan@codesourcery.com>
Pedro Alves  <pedro@codesourcery.com>

	Based on work by Jan Kratochvil <jan.kratochvil@redhat.com> and Jeff
 	Johnston <jjohnstn@redhat.com>.

	* NEWS: Mention attach to stopped process fix.
	* infcmd.c (detach_command, disconnect_command): Discard the thread
	list.
	* infrun.c (handle_inferior_event): Do not ignore non-SIGSTOP while
	attaching.  Use signal_stop_state.
	(signal_stop_state): Check stop_soon.
	* linux-nat.c (kill_lwp): Declare earlier.
	(pid_is_stopped, linux_nat_post_attach_wait): New.
	(lin_lwp_attach_lwp): Use linux_nat_post_attach_wait.  Update
	comments.
	(linux_nat_attach): Use linux_nat_post_attach_wait.
	(detach_callback, linux_nat_detach): Improve handling for signalled
	processes.
	(linux_nat_pid_to_str): Always print out the LWP ID if it differs
	from the process ID.
	* Makefile.in (infcmd.o): Update.

2008-05-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Daniel Jacobowitz  <dan@codesourcery.com>

	* gdb.threads/attach-into-signal.c, gdb.threads/attach-into-signal.exp,
	gdb.threads/attach-stopped.c, gdb.threads/attach-stopped.exp,
	gdb.threads/attachstop-mt.c, gdb.threads/attachstop-mt.exp: New.
2008-05-01 18:50:14 +00:00
Daniel Jacobowitz b39cc96258 * arm-linux-tdep.h (ARM_CPSR_REGNUM): Delete definition.
* arm-tdep.c (arm_frame_is_thumb): New.
	(arm_pc_is_thumb): Clarify comment.
	(thumb_analyze_prologue): Remove PC special case.
	(thumb_scan_prologue): Take a block_addr argument.  Use it for
	find_pc_partial_function.  Remove unused variables.
	(arm_scan_prologue): Use arm_frame_is_thumb.  Use the block address
	for find_pc_partial_function.  Remove PC special case.
	(arm_prologue_prev_register): Add special handling for PC and CPSR.
	(arm_dwarf2_prev_register, arm_dwarf2_frame_init_reg): New.
	(arm_get_next_pc): Use arm_frame_is_thumb.
	(arm_write_pc): Use CPSR_T instead of 0x20.
	(arm_gdbarch_init): Call dwarf2_frame_set_init_reg.
	* arm-tdep.h (enum gdb_regnum): Add ARM_CPSR_REGNUM.
	(CPSR_T): Define.
	* dwarf2-frame.c (dwarf2_frame_prev_register): Handle
	DWARF2_FRAME_REG_FN.
	* dwarf2-frame.h (enum dwarf2_frame_reg_rule): Add
	DWARF2_FRAME_REG_FN.
	(struct dwarf2_frame_state_reg): Add FN to loc union.

	* gdb.arch/thumb-prologue.exp: Do not expect a saved PC.
2008-05-01 18:30:51 +00:00
Joel Brobecker 36d520f5f6 * gdb.base/info-target.exp: New testcase. 2008-05-01 17:48:23 +00:00
Daniel Jacobowitz 8d4e307105 * gdb.cp/hang.exp: Use .cc instead of .C.
* gdb.cp/hang1.cc, gdb.cp/hang2.cc, gdb.cp/hang3.cc: Renamed from ...
	* gdb.cp/hang1.C, gdb.cp/hang2.C, gdb.cp/hang3.C: ... here.
2008-04-30 18:28:23 +00:00
Daniel Jacobowitz 6f3f3097b9 * gdb.base/gdb1250.exp: Remove perror.
* lib/mi-support.exp (mi_delete_breakpoints): Match the prompt.
2008-04-30 18:25:53 +00:00
Pedro Alves 5550a9142a * gdb.dwarf2/dw2-strp.S: Replace .long by .4byte and .value by
.2byte.
2008-04-30 13:54:10 +00:00
Daniel Jacobowitz d848e6871e * gdb.base/macscp.exp: Enable kfails. Compile with -g3 for GCC.
(maybe_kfail): New.
2008-04-25 21:47:11 +00:00
Pedro Alves 93b5768bfd gdb/
* dwarf2read.c (dwarf2_const_value): Handle DW_FORM_strp.

gdb/testsuite/
	* gdb.dwarf2/dw2-strp.S, gdb.dwarf2/dw2-strp.exp: New files.
2008-04-25 18:45:24 +00:00
Vladimir Prus 721c02def4 * mi/mi-main.c (last_async_command): Rename to current_token.
(previous_async_command): Remove.
        (mi_cmd_gdb_exit): Adjust.
        (mi_cmd_exec_interrupt): Don't dance with previous_async_command.
        (mi_cmd_target_select): Adjust.
        (mi_cmd_execute): Don't set previous_async_command.  Free token
        here even in async mode.
        (mi_execute_async_cli_command): Adjust.
        (mi_exec_async_cli_cmd_continuation): Adjust.  Do not free the
        token.
        (mi_load_progress): Adjust.
2008-04-24 12:09:49 +00:00
Vladimir Prus 74960c6002 * breakpoint.h (bp_location_p): New typedef.
Register a vector of bp_location_p.
	* breakpoint.c (always_inserted_mode)
	(show_always_inserted_mode): New.
	(unlink_locations_from_global_list): Remove.
	(update_global_location_list)
	(update_global_location_list_nothrow): New.
	(update_watchpoint): Don't free locations.
	(should_insert_location): New.
	(insert_bp_location): Use should_insert_location.
	(insert_breakpoint_locations): Copied from
	insert_breakpoints.
	(insert_breakpoint): Use insert_breakpoint_locations.
	(bpstat_stop_status): Call update_global_location_list
	when disabling breakpoint.
	(allocate_bp_location): Don't add to bp_location_chain.
	(set_raw_breakpoint)
	(create_longjmp_breakpoint, enable_longjmp_breakpoint)
	(disable_longjmp_breakpoint, create_overlay_event_breakpoint)
	(enable_overlay_breakpoints, disable_overlay_breakpoints)
	(set_longjmp_resume_breakpoint)
	(enable_watchpoints_after_interactive_call_stop)
	(disable_watchpoints_before_interactive_call_start)
	(create_internal_breakpoint)
	(create_fork_vfork_event_catchpoint)
	(create_exec_event_catchpoint, set_momentary_breakpoint)
	(create_breakpoints, break_command_1, watch_command_1)
	(create_exception_catchpoint)
	(handle_gnu_v3_exceptions)
	(disable_breakpoint, breakpoint_re_set_one)
	(create_thread_event_breakpoint, create_solib_event_breakpoint)
	(create_ada_exception_breakpoint): : Don't call check_duplicates.
	Call update_global_location_list.
	(delete_breakpoint): Don't remove locations and don't
	try to reinsert them. Call update_global_location_list.
	(update_breakpoint_locations): Likewise.
	(restore_always_inserted_mode): New.
	(update_breakpoints_after_exec): Temporary disable
	always inserted mode.
	* Makefile.in: Update dependencies.

	* infrun.c (proceed): Remove breakpoints while stepping
	over breakpoint.
	(handle_inferior_event): Don't remove or insert
	breakpoints.
	* linux-fork.c (checkpoint_command): Remove breakpoints
	before fork and insert after.
	(linux_fork_context): Remove breakpoints before switch
	and insert after.
	* target.c (target_disconnect, target_detach): Remove
	breakpoints from target.
2008-04-24 10:21:45 +00:00
Vladimir Prus d24317b480 * breakpoint.c (print_one_breakpoint_location): In MI
mode, report the location string the breakpoint was
	originally created with.
2008-04-24 08:46:19 +00:00
Paolo Bonzini fdc5970995 gdb:
2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

        * acinclude.m4: Add override.m4.
        * configure: Regenerate.

gdb/gdbserver:
2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

        * acinclude.m4: Add override.m4.
        * configure: Regenerate.

gdb/testsuite:
2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

        * aclocal.m4: Add override.m4.
        * configure: Regenerate.
2008-04-23 12:21:50 +00:00
Vladimir Prus 8e91f0232c * mi/mi-cmd-var.c (varobj_update_one): Print new
value for variable objects that changed type.
2008-04-19 17:03:20 +00:00
Craig Silverstein 233a11ab1c * configure.ac (AC_SEARCH_LIBS): Add check for zlib.
* config.in, configure: Regenerate.
	* dwarf2read.c: Include zlib.h if present.
	Modified *_SECTION macros.
	(section_is_p): New.
	(dwarf2_locate_sections): Use section_is_p instead of strcmp
	(dwarf2_resize_section): New.
	to determine whether a given section has a given name.
	(zlib_decompress_section): New.
	(dwarf2_read_section): Read the compressed section if present
	in the binary.
	* testsuite/gdb.dwarf2/dw2-compressed.S: New file.
	* testsuite/gdb.dwarf2/dw2-compressed.exp: New file.
	* MAINTAINERS: Added myself to section Write After Approval.
2008-04-19 05:06:54 +00:00
Joel Brobecker 9c1137add5 * gdb.ada/atomic_enum: New test program.
* gdb.ada/atomic_enum.exp: New testcase.
2008-04-19 01:35:49 +00:00
Doug Evans 66d0bbc7b8 * gdb.opt/Makefile.in: Fix whitespace. 2008-04-17 23:06:54 +00:00
Ulrich Weigand 100906b03a 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
* gdb.threads/linux-dp.exp: Continue after unrecognized lines.
2008-04-17 21:36:23 +00:00
Doug Evans 4584e32ea4 * buildsym.c (watch_main_source_file_lossage): New fn.
(end_symtab): Call it.

	* gdb.base/hashline1.exp: New testcase.
	* gdb.base/hashline2.exp: New testcase.
	* gdb.base/hashline2.exp: New testcase.
2008-04-17 17:54:05 +00:00
Pedro Alves 0a320680e8 gdb/
* inf-loop.c (inferior_event_handler): Also run the intermediate
	continuations in the INF_EXEC_COMPLETE case.

	gdb/testsuite/
	* gdb.base/step-break.exp, gdb.base/step-break.c: New files.
2008-04-17 11:49:56 +00:00
Aleksandar Ristovski 18ac113bcc * gdb.base/attach.exp (do_attach_tests): Matching pattern for
temporary breakpoint to match "Temporary breakpoint".
	* gdb.base/break.exp (delete_breakpoints): Likewise.
	* gdb.base/call-ar-st.exp (get_debug_format): Likewise.
	* gdb.base/commands.exp (temporary_breakpoint_commands): Likewise.
	* gdb.base/display.exp: Likewise.
	* gdb.base/foll-exec.exp (do_exec_tests): Likewise.
	* gdb.base/foll-fork.exp (catch_fork_child_follow): Likewise.
	* gdb.base/restore.exp (restore_tests): Likewise.
	* gdb.base/sepdebug.exp: Likewise.
	* gdb.base/watchpoint.exp: Likewise.
	* gdb.mi/mi-cli.exp: Added argument for new "disp" field.
	* gdb.mi/mi-pending.exp: Likewise.
	* gdb.mi/mi-simplerun.exp (test_running_the_program): Likewise.
	* gdb.mi/mi-until.exp (test_runnint_to_foo): Likewise.
	* gdb.mi/mi-var-cmd.exp: Likewise.
	* gdb.mi/mi-var-display.exp: Likewise.
	* gdb.mi/mi2-cli.exp: Likewise.
	* gdb.mi/mi2-simplerun.exp (test_running_the_program): Likewise.
	* gdb.mi/mi2-until.exp (test_running_to_foo): Likewise.
	* gdb.mi/mi2-var-display.exp: Likewise.
	* lib/gdb.exp (gdb_breakpoint): Pattern for temporary breakpoint.
	* lib/mi-support.exp (mi_runto_helper): Use "after_reason" argument for
	new "disp" field.
	(mi_expect_stop): Move after_reason argument to be really after
	reason. This is to support fix for PR2424.
2008-04-15 14:33:55 +00:00
Jan Kratochvil add386939d * gdb.dwarf2/dw2-ranges.S: New stub `.file' directive. 2008-04-15 09:00:32 +00:00
Vladimir Prus fcacd99f87 Fix @-varobjs.
* varobj.c (value_of_root): Update the expression for
        floating varobjs.
        * mi/mi-cmd-var.c (varobj_update_one): If type has changed,
        report that.
2008-04-13 09:33:49 +00:00
Marc Khouzam de051565df gdb/ChangeLog
2008-04-09  Marc Khouzam  <marc.khouzam@ericsson.com>

        * mi/mi-cmd-var.c: Include "mi-getopt.h".
        (mi_parse_format): New.  Factored out from mi_cmd_var_set_format.
        (mi_cmd_var_set_format): Use new mi_parse_format.
        (mi_cmd_var_evaluate_expression): Support for -f option to specify
        format.
        * Makefile.in (mi-cmd-var.o): Update dependencies.

        * varobj.h (varobj_get_formatted_value): Declare.
        * varobj.c (my_value_of_variable): Added format parameter.
        (cplus_value_of_variable): Likewise.
        (java_value_of_variable): Likewise.
        (c_value_of_variable): Likewise.  Evaluate expression based
        on format parameter.
        (struct language_specific): Add format parameter to function member
        *value_of_variable.
        (varobj_get_formatted_value): New.
        (varobj_get_value): Added format parameter to method call.

gdb/doc/ChangeLog
2008-04-09  Marc Khouzam  <marc.khouzam@ericsson.com>

        * gdb.texinfo (GDB/MI Variable Objects): Add anchor to
        -var-set-format.  Add -f option to -var-evaluate-expression.

gdb/testsuite/ChangeLog
2008-04-09  Marc Khouzam  <marc.khouzam@ericsson.com>

        * gdb.mi/mi2-var-display.exp: Added tests for the new -f
        option of -var-evaluate-expression.
        * gdb.mi/mi2-var-display.exp: Likewise.
2008-04-09 13:29:55 +00:00
Vladimir Prus dbc5282291 Introduce test setup helpers.
* lib/gdb.exp (build_executable, clean_restart)
        (prepare_for_testing): New.
        * gdb.base/break.exp: Use prepare_for_testing, and clean_restart.
        * gdb.base/return.exp: Likewise.
        * gdb.base/ending-run.exp: Likewise.
2008-04-07 16:32:44 +00:00
Nick Roberts 473591da7a *** empty log message *** 2008-04-06 22:44:47 +00:00
Nick Roberts fd0e64da87 New test for asynchronous Machine Interface (MI) responses. 2008-04-06 22:41:19 +00:00
Vladimir Prus 2b2d9e11a0 Fix breakpoint condition that use member variables.
* valops.c (check_field): Remove.
        (check_field_in): Rename to check_field.
        (value_of_this): Use la_name_of_this.
        * value.h (check_field): Adjust prototype.

        * language.h (la_value_of_this): Rename to la_name_of_this.
        * language.c (unknown_language_defn): Specify "this" for
        name_of_this.
        (auto_language_defn): Likewise.
        (local_language_defn): Likewise.
        * ada-lang.c (ada_language_defn): Adjust comment.
        * c-lang.c (c_language_defn): Adjust comment.
        (cplus_language_defn): Specify "this" for name_of_this.
        (asm_language_defn): Adjust comment.
        (minimal_language_defn): Adjust comment.
        * f-lang.c (f_language_defn): Specify NULL for name_of_this.
        * jv-lang.c (java_language_defn): Specify "this" for name_of_this.
        * m2-lang.c (m2_language_defn): Specify "this" for name_of_this.
        * objc-lang.c (objc_language_defn): Specify "self" for
        name_of_this.
        * p-lang.c (pascal_language_defn): Specify "this" for
        name_of_this.
        * scm-lang.c (scm_language_defn): Specify NULL for name_of_this.

        * symtab.c (lookup_symbol_aux): Lookup "this" in the
        proper scope, and check for field in type of "this", without
        trying to create a value.
2008-04-06 08:56:37 +00:00
Vladimir Prus bb3784283e * lib/mi-support.exp (mi_expect_stop): New.
(mi_run_cmd): Change the
	token.  Use mi_send_resuming_command, use
	mi_expect_stop.
	(mi_execute_to_helper): Rename to mi_execute_to.
	(mi_send_resuming_command): Add more error patterns.
	(mi_wait_for_stop): Renamed to...
	(mi_get_stop_line): ...this.
	(mi_run_inline_test): Adjust.

	* gdb.mi/mi-cli.exp: Use mi_execute_to/mi_expect_stop.
	* gdb.mi/mi-console.exp: Likewise.
	* gdb.mi/mi-pending.exp: Likewise.
	* gdb.mi/mi-simplerun.exp: Likewise.
	* gdb.mi/mi-stack.exp: Likewise.
	* gdb.mi/mi-stepi.exp: Likewise.
	* gdb.mi/mi-syn-frame.exp: Add comment.
	* gdb.mi/mi-until.exp: Likewise.
	* gdb.mi/mi-var-display.exp: Likewise.
	* gdb.mi/mi-watch.exp: Likewise.
	* gdb.mi/mi2-cli.exp: Likewise.
	* gdb.mi/mi2-console.exp: Likewise.
	* gdb.mi/mi2-simplerun.exp: Likewise.
	* gdb.mi/mi2-stack.exp: Likewise.
	* gdb.mi/mi2-stepi.exp: Likewise.
	* gdb.mi/mi2-until.exp: Likewise.
	* gdb.mi/mi2-var-display.exp: Likewise.
	* gdb.mi/mi2-watch.exp: Likewise.
2008-04-05 17:12:46 +00:00
Ulrich Weigand 62172bb981 * gdb.base/watch_thread_num.exp: Use gdb_compile_pthreads.
* gdb.cp/mb-templates.exp: Skip test on spu*-*-* targets.
2008-04-04 22:59:28 +00:00
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