Commit Graph

564 Commits

Author SHA1 Message Date
Joel Brobecker 6130d0b72b * infrun.c: Minor comment reformatting. 2008-10-25 16:03:14 +00:00
Hui Zhu fff0886884 2008-10-24 Hui Zhu <teawater@gmail.com>
Pedro Alves  <pedro@codesourcery.com>

	* infrun.c (can_use_displaced_stepping): Change type to
	const char pointer.
	(can_use_displaced_stepping_auto): New string.
	(can_use_displaced_stepping_on): New string.
	(can_use_displaced_stepping_off): New string.
	(can_use_displaced_stepping_enum): New array.
	(show_can_use_displaced_stepping): In auto mode, also show
	the current effect of the option.
	(use_displaced_stepping): Return non-zero if displaced
	stepping is auto, and can be used with GDBARCH, and in
	non-stop mode.  Return non-zero if displaced stepping is on,
	and can be used with GDBARCH.  Return zero otherwise.
	(_initialize_infrun): Make the "set displaced-stepping"
	command an enum command.  Change its class to class_run.
	Place it in the top level set list.  Extend help to describe
	the auto mode.

2008-10-24  Hui Zhu  <teawater@gmail.com>
	    Pedro Alves  <pedro@codesourcery.com>

	* gdb.texinfo (displaced-stepping): Describe the auto mode
	setting, and say it's the default.  This is now a mainstream
	setting instead of a maintenance setting.
2008-10-24 02:31:41 +00:00
Pedro Alves 252fbfc86a gdb/
2008-10-23  Pedro Alves  <pedro@codesourcery.com>

	* defs.h: Mention ptid_is_pid.
	* inferior.h (ptid_is_pid): Declare.
	* gdbthread.h (struct thread_info) <stop_requested>: New field.
	(set_stop_requested): Declare.
	* infcmd.c (interrupt_target_1): Call set_stop_requested.
	* infrun.c (clear_proceed_status): Clear stop_requested.
	(infrun_thread_stop_requested_callback,
	infrun_thread_stop_requested): New.
	(handle_inferior_event): If a TARGET_SIGNAL_TRAP is reported on a
	thread that had an explicit stop request, pretend we got a
	TARGET_SIGNAL_0.  Always stop if the thread had an explicit stop
	request.
	(print_stop_reason): In the SIGNAL_RECEIVED case, if we're not
	outputting to MI, and we got a TARGET_SIGNAL_0, print "# Stopped",
	instead of mentioning signal 0.
	(ptid_is_pid): New.
	* thread.c (set_stop_requested): New.

	* linux-nat.c (queued_waitpid): Rename to ...
	(queued_waitpid_1): ... this.  Add `peek' argument.  Handle it.
	(queued_waitpid): New, as wrapper to queued_waitpid_1.
	(push_waitpid): Push the SIGTRAP to the local event queue, to the
	kernel's.
	(send_sigint_callback): Delete.
	(linux_nat_stop_lwp): New.
	(linux_nat_stop): Use it.

gdb/doc/
2008-10-23  Pedro Alves  <pedro@codesourcery.com>

	* observer.texi (thread_stop_requested): New.

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

	* lib/mi-support.exp (mi_expect_interrupt): Expect signal 0
	instead of SIGINT.
2008-10-23 23:11:21 +00:00
Hui Zhu 40e12b06fe 2008-10-19 Hui Zhu <teawater@gmail.com>
* infrun.c (handle_inferior_event): Set "stop_pc" when
	TARGET_WAITKIND_NO_HISTORY.
2008-10-20 02:56:39 +00:00
Pedro Alves 4058b83970 * infrun.c (adjust_pc_after_break): Do nothing if executing in
reverse.
2008-10-18 03:24:34 +00:00
Michael Snyder b2175913c5 2008-10-17 Michael Snyder <msnyder@vmware.com>
Target interface for reverse debugging.
	* target.h (enum target_waitkind):
	Add new wait event, TARGET_WAITKIND_NO_HISTORY.
	(struct target_ops): New method to_can_execute_reverse.
	(target_can_execute_reverse): New macro.
	* target.c (update_current_target): Inherit to_can_execute_reverse.

	Remote interface for reverse debugging.
	* remote.c (remote_can_execute_reverse): New target method.
	(remote_resume): Check for reverse exec direction, and send
	appropriate command to target.
	(remote_wait_as): Check target response for NO_HISTORY status.
	Also check for empty reply (target doesn't understand "bs" or "bc).
	(remote_vcont_resume): Jump out if attempting reverse execution.

	Event handling interface for reverse debugging.
	* infrun.c (execution_direction): New state variable.
	(enum inferior_stop_reason): Add NO_HISTORY reason.
	(handle_inferior_event): Handle TARGET_WAITKIND_NO_HISTORY.
	Handle stepping over a function call in reverse.
	Handle stepping thru a line range in reverse.
	Handle setting a step-resume breakpoint in reverse.
	Handle stepping into a function in reverse.
	Handle stepping between line ranges in reverse.
	(print_stop_reason): Print reason for NO_HISTORY.
	(step_into_function): Rename to handle_step_into_function.
	(handle_step_into_function_backward): New function.
	(set_exec_direction_func, show_exec_direction_func): New funcs.
	(proceed): No need to singlestep over a breakpoint
	when resuming in reverse.

	* inferior.h (enum exec_direction_kind): New enum.
	(execution_direction): Export new execution state variable.

	* breakpoint.c (make_breakpoint_silent): New function.
	* breakpoint.h (make_breakpoint_silent): Export.
	* infcmd.c (finish_command): Check for reverse exec direction.
	(finish_backward): New function, handle finish cmd in reverse.

	User interface for reverse execution.
	* Makefile.in (reverse.c): New file.
	* reverse.c: New file.  User interface for reverse execution.
2008-10-17 19:43:47 +00:00
Pedro Alves 1c5cfe8615 gdb/
*	breakpoint.c (breakpoint_init_inferior): Clean up the moribund
	locations list.
	(moribund_breakpoint_here_p): Record the moribund
	location in the moribund_locations vector.
	* breakpoint.h (moribund_breakpoint_here_p): Declare.
	(displaced_step_fixup): Check if the breakpoint the thread was
	trying to step over has been removed since having been placed in
	the displaced stepping queue.
	(adjust_pc_after_break): In non-stop mode, check for a moribund
	breakpoint at the stop pc.
	(handle_inferior_event): Don't retire moribund breakpoints on
	TARGET_WAITKIND_IGNORE.

gdb/testsuite/
	* gdb.mi/mi-nsmoribund.exp, gdb.mi/nsmoribund.c: New test.
2008-10-15 19:15:34 +00:00
Pedro Alves ad53cd7154 * infrun.c (displaced_step_prepare): Switch thread temporarily
while we're here.
	(displaced_step_fixup): Make sure target_resume sees ptid as
	inferior_ptid.  Add debug output.
2008-10-14 23:39:29 +00:00
Michael Snyder 8002d778c3 2008-10-05 Michael Snyder <msnyder@promb-2s-dhcp59.eng.vmware.com>
* infrun.c (handle_inferior_event): Fix typo in comment.
2008-10-05 19:52:11 +00:00
Paul Pluzhnikov d1a4106143 2008-10-03 Paul Pluzhnikov <ppluzhnikov@google.com>
* utils.c, defs.h (gdb_buildargv): New fn. Wrap buildargv
	and check for out-of-memory condition.
	* exec.c (exec_file_command): Call it.
	* infrun.c (handle_command, xdb_handle_command): Likewise.
	* interps.c (interpreter_exec_cmd): Likewise.
	* linux-nat.c (linux_nat_info_proc_cmd): Likewise.
	* procfs.c (info_proc_cmd): Likewise.
	* remote-mips.c (common_open): Likewise.
	* remote-sim.c (gdbsim_kill, gdbsim_create_inferior)
	(gdbsim_open): Likewise.
	* remote.c (extended_remote_run, remote_put_command)
	(remote_get_command, remote_delete_command): Likewise.
	* ser-mingw.c (pipe_windows_open): Likesise.
	* source.c (add_path, show_substitute_path_command)
	(unset_substitute_path_command, set_substitute_path_command):
	Likewise.
	* stack.c (backtrace_command): Likewise.
	* symfile.c (symbol_file_command, generic_load)
	(add_symbol_file_command): Likesise.
	* symmisc.c (maintenance_print_symbols, maintenance_print_psymbols)
	(maintenance_print_msymbols): Likewise.
2008-10-03 16:36:10 +00:00
Daniel Jacobowitz db5f024ecc * mips-linux-tdep.c (mips_linux_in_dynsym_resolve_code): Update
comments.
	(mips_linux_skip_resolver): Also use glibc_skip_solib_resolver.
	(mips_linux_init_abi): Do not override skip_trampoline_code.
	* configure.tgt (mips*-*-linux*): Add glibc-tdep.o.
	* mips-tdep.c (mips32_scan_prologue): Stop scanning at branches.
	(mips_stub_frame_sniffer): Use the stub frame sniffer for PIC stubs.
	(mips_skip_mips16_trampoline_code): Rename from
	mips_skip_trampoline_code.
	(mips_skip_pic_trampoline_code, mips_skip_trampoline_code): New.
	* infrun.c (handle_inferior_event): Do not pass zero to
	in_solib_dynsym_resolve_code.
2008-10-02 15:48:06 +00:00
Pedro Alves 6ca15a4b21 * infrun.c (follow_exec): Don't do a generic mourn. Instead
inline the required bits.
	* breakpoint.h (enum inf_context): Add inf_execd.
2008-09-22 15:26:53 +00:00
Pedro Alves 795e548fb8 * infrun.c (handle_inferior_event): In the follow exec case,
context-switch before doing anything else.
2008-09-22 15:25:54 +00:00
Pedro Alves d6b48e9c8b Make the stop_soon global be per-inferior instead.
* infcmd.c (attach_command_post_wait): Adjust.
	(attach_command): Likewise.

	* inferior.h (stop_soon): Delete.
	(struct inferior): Add stop_soon member.

	* infrun.c (stop_soon): Delete.
	(clear_proceed_status, start_remote)
	(fetch_inferior_event, handle_inferior_event): Adjust.
	(signal_stop_state): Don't check stop_soon here.  Check in callers
	instead.
	(save_inferior_status, restore_inferior_status): Adjust.

	* linux-nat.c (linux_nat_resume, linux_nat_wait): Always pass
	signals to common code if starting up the inferior.

	* inferior.h (struct inferior_info): Added stop_soon member.
	* inferior.c (add_inferior) Clear stop_soon.

	* mips-tdep.c (heuristic_proc_start): Adjust.
	* nto-procfs.c (procfs_create_inferior): Adjust.
	* solib-irix.c (irix_solib_create_inferior_hook): Adjust.
	* solib-osf.c (osf_solib_create_inferior_hook): Adjust.
	* solib-sunos.c (sunos_solib_create_inferior_hook): Adjust.
	* solib-svr4.c (svr4_solib_create_inferior_hook): Adjust.

	* win32-nat.c (do_initial_win32_stuff): Adjust.

	* alpha-tdep.c (alpha_heuristic_proc_start): Adjust.
2008-09-22 15:20:08 +00:00
Jan Kratochvil 88ed393a46 Fix a crash on uninitialized ECS->EVENT_THREAD for a newly found thread.
* infrun.c (wait_for_inferior): Move this ECS->EVENT_THREAD
	initialization ...
	(fetch_inferior_event): ... and this ECS->EVENT_THREAD initialization
	...
	(handle_inferior_event): ... here after the add_thread call together
	with the local adjust_pc_after_break and reinit_frame_cache calls.
2008-09-17 21:48:49 +00:00
Ulrich Weigand 8b9b9e1a3a * defs.h (struct gdbarch): Add forward declaration.
(set_next_address): Add GDBARCH argument.
	* printcmd.c (set_next_address): Use it to find pointer type.
	* breakpoint.c (breakpoint_1): Update call.
	* source.c (line_info): Likewise.
	* findcmd.c (find_command): Use current_gdbarch to find pointer type.

	* breakpoint.c (set_breakpoint_count): Use platform-neutral
	types for internal variable values.
	* infrun.c (handle_inferior_event): Likewise.
	* source.c (forward_search_command, reverse_search_command): Likewise.
	* tracepoint.c (set_tracepoint_count, set_traceframe_num,
	set_tracepoint_num, set_traceframe_context): Likewise.
2008-09-11 14:21:49 +00:00
Pedro Alves d51fd4c898 gdb/
* infrun.c (normal_stop): Run hook-stop last.

gdb/testsuite/
	* gdb.base/hook-stop-continue.c: New.
	* gdb.base/hook-stop-continue.exp: New.
2008-09-09 18:58:20 +00:00
Pedro Alves dcf4fbde10 * inferior.h (context_switch_to): Delete.
* infrun.c (context_switch): Don't save and load infrun state.
	(context_switch_to): Delete.

	* infcmd.c (proceed_thread_callback): Replace context_switch_to
	calls by switch_to_thread calls.

	* gdbthread.h (save_infrun_state, load_infrun_state): Delete.
	* thread.c (main_thread_state, main_thread_executing): Delete.
	(inferior_thread): Delete references to them.
	(add_thread_silent): Fix case where we're adding a thread with the
	same ptid as an exited thread.  Remove references to
	context-switching.
	(load_infrun_state, save_infrun_state): Delete.
	(thread_alive, is_thread_state, any_running, is_executing)
	(set_executing): Remove the special handling for targets that
	don't register any thread.
	(restore_current_thread, thread_apply_all_command)
	(do_captured_thread_select): Unconditionally call
	switch_to_thread.

	* mi/mi-main.c (mi_cmd_execute): Check for exited threads.
	Call switch_to_thread instead of context_switch_to.
2008-09-08 22:10:20 +00:00
Pedro Alves fedae5ffbc * infrun.c (context_switch): Don't context-switch the continuations. 2008-09-08 22:04:54 +00:00
Pedro Alves 414c69f7a7 Remove the global stop_step in favour of a per-thread
stop_step.

	* inferior.h (stop_step): Delete.

	* gdbthread.h (struct thread_info): Add comments to stop_step.
	(save_infrun_state, load_infrun_state): Remove stop_step argument.
	* thread.c (load_infrun_state, save_infrun_state): Remove
	stop_step argument, and references to it.

	* infrun.c (clear_proceed_status): Clear stop_step.
	(fetch_inferior_event): Adjust.
	(context_switch): Don't context-switch stop_step.
	(handle_inferior_event): Adjust.
	(normal_stop): Adjust.
	(save_inferior_status, restore_inferior_status): Adjust.

	* infcmd.c (stop_step): Delete.
	(step_1, step_1_continuation, step_once, until_next_command):
	Adjust.
2008-09-08 21:55:16 +00:00
Pedro Alves af679fd003 Remove the global step_multi in favour of a per-thread
step_multi.

	* inferior.h (step_multi): Delete.
	* gdbthread.h (struct thread_info): Add comments around
	step_multi.
	(save_infrun_state, load_infrun_state): Remove step_multi
	parameter.
	* thread.c (load_infrun_state, save_infrun_state): Remove
	step_multi argument, and references to it.
	* infcmd.c (step_multi): Delete.
	(step_1): Adjust.
	(step_1_continuation, until_next_command): Adjust.
	* infrun.c (fetch_inferior_event): Adjust.
	(context_switch): Don't context-switch step_multi.
	(print_stop_reason, normal_stop): Adjust.
2008-09-08 21:52:25 +00:00
Pedro Alves 2020b7abd8 Remove the global stop_signal in favour of a per-thread
stop_signal.

	* inferior.h (stop_signal): Delete.
	* gdbthread.h (save_infrun_state, load_infrun_state): Remove
	stop_signal argument.
	* thread.c (load_infrun_state, save_infrun_state): Remove
	stop_signal argument.  Don't reference it.

	* infcmd.c (stop_signal): Delete.
	(program_info): Adjust.
	* infrun.c (resume): Clear stop_signal.
	(proceed): Adjust.  Pass the last stop_signal to the thread we're
	resuming.
	(context_switch): Don't context-switch stop_signal.
	(handle_inferior_event, keep_going): Adjust.
	(save_inferior_status, restore_inferior_status): Adjust.

	* fbsd-nat.c: Include "gdbthread.h".
	(find_signalled_thread, find_stop_signal): New.
	(fbsd_make_corefile_notes): Use it.
	* fork-child.c (startup_inferior): Adjust.

	* linux-nat.c (get_pending_status): Adjust.
	(linux_nat_do_thread_registers): Adjust.
	(find_signalled_thread, find_stop_signal): New.
	(linux_nat_do_thread_registers): Add stop_signal parameter.
	(struct linux_nat_corefile_thread_data): Add stop_signal member.
	(linux_nat_corefile_thread_callback): Pass stop_signal.
	(linux_nat_do_registers): Delete.
	(linux_nat_make_corefile_notes): Use find_stop_signal.  Assume
	there's always a thread.

	* procfs.c (find_signalled_thread, find_stop_signal): New.
	(find_stop_signal): New.
	(procfs_do_thread_registers): Add stop_signal parameter.
	(struct procfs_corefile_thread_data): Add stop_signal member.
	(procfs_corefile_thread_callback): Pass args->stop_signal.
	(procfs_make_note_section): Find the last stop_signal.

	* solib-irix.c: Include gdbthread.h.
	(irix_solib_create_inferior_hook): Adjust.
	* solib-osf.c: Include gdbthread.h.
	(osf_solib_create_inferior_hook): Adjust.
	* solib-sunos.c: Include gdbthread.h.
	(sunos_solib_create_inferior_hook): Adjust.
	* solib-svr4.c: Include gdbthread.h.
	(svr4_solib_create_inferior_hook): Adjust.

	* win32-nat.c (do_initial_win32_stuff): Adjust.
2008-09-08 21:51:18 +00:00
Pedro Alves 32400bebb2 * gdbthread.h (struct thread_info): Add comments around
proceed_to_finish.
	(save_infrun_state, load_infrun_state): Remove proceed_to_finish
	argument.
	* thread.c (load_infrun_state, save_infrun_state): Delete
	proceed_to_finish argument and references to it.

	* infcall.c (call_function_by_hand): Adjust.
	* infcmd.c (finish_command): Adjust.
	* infrun.c (proceed_to_finish): Delete.
	(clear_proceed_status): Adjust.
	(context_switch): Don't context-switch proceed_to_finish.
	(normal_stop, save_inferior_status, restore_inferior_status):
	Adjust.
2008-09-08 21:48:52 +00:00
Pedro Alves 347bddb745 * inferior.h (stop_bpstat): Delete.
* breakpoint.h (bpstat_do_actions): Remove bpstat* argument.

	* breakpoint.c (bpstat_do_actions): Rename to ...
	(bpstat_do_actions_1): ... this.  Make static.  Change return type
	to int.  Return true if a breakpoint proceeded.
	(bpstat_do_actions): New, as wrapper around bpstat_do_actions_1.
	(delete_breakpoint): Don't reference the global stop_bpstat; it's
	gone.

	* gdbthread.h (struct thread_info): Add stop_bpstat.
	(save_infrun_state, load_infrun_state): Remove stop_bpstat
	argument.
	* thread.c (load_infrun_state, save_infrun_state): Remove
	stop_bpstat argument, and the code referencing it.

	* infcall.c: Include "gdbthread.h".
	(call_function_by_hand): Adjust.
	* exceptions.c: Include "gdbthread.h".
	(throw_exception): Adjust.
	* infcmd.c (stop_bpstat): Delete.
	(continue_command): In all-stop, set the ignore count on the
	thread that reported the stop.  In non-stop, set it on the current
	thread.
	(finish_command_continuation): Adjust.
	(program_info): Adjust.
	* infrun.c (clear_proceed_status): Adjust.
	(context_switch): Don't context-switch stop_bpstat.
	(handle_inferior_event): Adjust.
	(normal_stop): Adjust.
	(save_inferior_status, restore_inferior_status): Adjust.

	* inf-loop.c (inferior_event_handler): Remove parameter to
	bpstat_do_actions call.
	* top.c (command_loop): Remove parameter to bpstat_do_actions
	call.  Call it unconditionally.
	* event-top.c (command_handler): Ditto.
	* python/python.c (execute_gdb_command): Ditto.
2008-09-08 21:46:21 +00:00
Pedro Alves 078130d0ca * inferior.h (step_over_calls): Delete.
* gdbthread.h (save_infrun_state, load_infrun_state): Remove
	step_over_calls argument.
	* thread.c (save_infrun_state, load_infrun_state): Remove
	step_over_calls argument.  Adjust.

	* infcmd.c (step_over_calls): Delete.
	(step_1): Adjust.
	* infrun.c (clear_proceed_status): Adjust.
	(context_switch): Don't context-switch step_over_calls.
	(handle_inferior_event, save_inferior_status)
	(restore_inferior_status): Adjust.
2008-09-08 21:43:00 +00:00
Pedro Alves 4e1c45eac7 Remove context switching in favour of accessing thread_info fields
directly.

	* infrun.c (stepping_over_breakpoint, step_resume_breakpoint):
	Delete.
	(struct thread_stepping_state): Delete.
	(gtss, tss): Delete.
	(follow_inferior_reset_breakpoints, follow_exec)
	(resume, clear_proceed_status): Adjust.
	(prev_pc): Delete.
	(proceed, start_remote, init_wait_for_inferior): Adjust.
	(struct execution_control_state): Add event_thread member.
	(delete_step_resume_breakpoint_callback)
	(delete_step_thread_step_resume_breakpoint)
	(delete_step_thread_step_resume_breakpoint_cleanup)
	(delete_step_thread_step_resume_breakpoint): New.
	(wait_for_inferior, init_execution_control_state): Use
	delete_step_thread_step_resume_breakpoint_cleanup.
	(wait_for_inferior): Set the event_thread.
	(fetch_inferior_event): Ditto.  Delete the step-resume breakpoint
	with delete_step_thread_step_resume_breakpoint.
	(init_thread_stepping_state): Change parameter type to
	thread_info.  Adjust.
	(context_switch): Don't context switch prev_pc,
	stepping_over_breakpoint, step_resume_breakpoint,
	step_range_start, step_range_end, step_frame_id,
	tss->stepping_over_breakpoint,
	tss->stepping_through_solib_after_catch,
	tss->stepping_through_solib_catchpoints, tss->current_line, or
	tss->current_symtab.
	(adjust_pc_after_break, handle_inferior_event)
	(currently_stepping, step_into_function)
	(insert_step_resume_breakpoint_at_sal)
	(insert_longjmp_resume_breakpoint, keep_going): Adjust.
	(clear_stepping_state): New.
	(normal_stop): Adjust.
	(save_inferior_status, restore_inferior_status): Adjust.

	* gdbthread.h (struct thread_info): Comments describing the
	members moved here.  Add step_after_step_resume_breakpoint.
	(delete_step_resume_breakpoint): Add thread_info argument.
	(save_infrun_state, load_infrun_state): Remove prev_pc,
	trap_expected, step_resume_breakpoint, step_range_start,
	step_range_end, step_frame_id, another_trap,
	stepping_through_solib_after_catch,
	stepping_through_solib_catchpoints, current_line and
	current_symtab function arguments.
	(inferior_thread): Declare.

	* thread.c (inferior_thread): New.
	(delete_step_resume_breakpoint): Add a thread_info parameter and
	rewrite.
	(load_infrun_state, save_infrun_state): Remove prev_pc,
	trap_expected, step_resume_breakpoint, step_range_start,
	step_range_end, step_frame_id, stepping_over_breakpoint,
	stepping_through_solib_after_catch,
	stepping_through_solib_catchpoints, current_line and
	current_symtab args.  Remove code referencing them.

	* infcmd.c (step_range_start, step_range_end, step_frame_id):
	Delete.
	(step_1, step_once, until_next_command): Adjust.

	* inferior.h (step_range_start, step_range_end, step_frame_id):
	Delete.

	* linux-nat.c (linux_child_follow_fork): If following the child,
	move the step state to it.  Adjust.
	* inf-ptrace.c (inf_ptrace_follow_fork): Ditto.
	* inf-ttrace.c (inf_ttrace_follow_fork): Ditto.
2008-09-08 21:40:39 +00:00
Ulrich Weigand a45ae3ed06 * dummy-frame.h (dummy_frame_pop): Add prototype.
* dummy-frame.c: Include "observer.h".
	(dummy_frame_push): Do not check for stale frames.
	(dummy_frame_pop): New function.
	(cleanup_dummy_frames): New function.
	(_initialize_dummy_frame): Install it as inferior_created observer.

	* frame.h (struct frame_id): Update comments.
	(frame_id_inner): Remove prototype.
	* frame.c (frame_id_inner): Make static.  Add comments.
	(frame_find_by_id): Update frame_id_inner safety net check to avoid
	false positives for targets using non-contiguous stack ranges.
	(get_prev_frame_1): Update frame_id_inner safety net check.
	(frame_pop): Call dummy_frame_pop when popping a dummy frame.

	* stack.c (return_command): Directly pop the selected frame.
	* infrun.c (handle_inferior_event): Remove dead code.
	* i386-tdep.c (i386_push_dummy_call): Update comment.
2008-08-26 17:40:25 +00:00
Ulrich Weigand 24a73cce8b * infrun.c (adjust_pc_after_break): Do not call get_thread_regcache
if the thread has already exited.
2008-08-22 14:47:13 +00:00
Pedro Alves e0bb1c1c26 * infrun.c (proceed): Move back setting previous_inferior_ptid
from here ...
	(wait_for_inferior): ... to here.
	(fetch_inferior_event): ... and here.
2008-08-22 14:06:29 +00:00
Vladimir Prus 7f7efbd95f * infrun.c (resume): If the thread is placed to the deferred step
queue, mark it as running.
2008-08-19 13:57:28 +00:00
Pedro Alves 5231c1fd73 2008-08-18 Pedro Alves <pedro@codesourcery.com>
gdb/doc/
	* observer.texi (thread_ptid_changed): New.

	gdb/
	* gdbthread.h (thread_change_ptid): Declare.
	* infrun.c (infrun_thread_ptid_changed): New.
	(_initialize_infrun): Attach infrun_thread_ptid_changed to the
	thread_ptid_changed observer.
	* regcache.c (regcache_thread_ptid_changed): New.
	(_initialize_regcache): Attach regcache_thread_ptid_changed to the
	thread_ptid_changed observer.
	* thread.c (thread_change_ptid): New.
2008-08-18 22:35:17 +00:00
Pedro Alves 83c265ab84 * infrun.c (fetch_inferior_event): Only call normal_stop if not
stopping quietly.
2008-08-16 01:04:16 +00:00
Stan Shebs cfd8ab242a Scrub remnants of IN_SOLIB_DYNSYM_RESOLVE_CODE.
* gdbarch.sh: Adjust comment to refer to
	in_solib_dynsym_resolve_code().
	* gdbarch.h, gdbarch.c: Update.
	* solib-osf.c: Ditto.
	* infrun.c: Ditto.
	(handle_inferior_event): Use in_solib_dynsym_resolve_code
	unconditionally.
	* config/mips/nm-irix5.h: Remove undef of
	IN_SOLIB_DYNSYM_RESOLVE_CODE.

	* gdbint.texinfo: Refer to target_so_ops.in_dynsym_resolve_code
	instead of IN_SOLIB_DYNSYM_RESOLVE_CODE.
2008-07-22 02:10:14 +00:00
Daniel Jacobowitz eb2f4a08ce Revert frame_unwind_caller_pc / frame_unwind_caller_id. 2008-07-15 23:29:24 +00:00
Daniel Jacobowitz 54af988d1e * frame.c (frame_unwind_id): Renamed to ...
(frame_unwind_caller_id): ... this.  All callers updated.
	(frame_pc_unwind): Renamed to ...
	(frame_unwind_caller_pc): ... this.  All callers updated.
	* frame.h: Document frame_unwind_caller_WHAT functions.
	(frame_unwind_id): Renamed to ...
	(frame_unwind_caller_id): ... this.
	(frame_pc_unwind): Renamed to ...
	(frame_unwind_caller_pc): ... this.
	* hppa-tdep.c (hppa_find_unwind_entry_in_block): Correct comment.
	* stack.c (parse_frame_specification_1): Do not rely on
	frame_unwind_id.
2008-07-15 18:58:32 +00:00
Luis Machado 8c90c1370d * infrun.c (handle_inferior_event): Tag threads as stopped
before inserting breakpoints.
2008-07-15 17:25:21 +00:00
Pedro Alves 2afb61aa0b 2008-07-12 Pedro Alves <pedro@codesourcery.com>
* infrun.c (struct thread_stepping_state): Delete sal member.
	(init_thread_stepping_state): Add local sal.  Use it instead of
	tss->sal.
	(handle_inferior_event): New local stop_pc_sal.  Use it instead of
	tss->sal.
	(step_into_function): Add local stop_func_sal.  Use it instead of
	tss->sal.
2008-07-12 18:39:10 +00:00
Vladimir Prus d56b7306e3 * infrun.c (resume): Discard cleanups on early exit path. 2008-07-12 13:42:54 +00:00
Vladimir Prus b1a268e5b4 * infrun.c (normal_stop): For MI, report which threads
were stopped.
2008-07-12 12:41:56 +00:00
Pedro Alves a0d21d2808 * infrun.c (handle_inferior_event): Also ignore a
TARGET_SIGNAL_TRAP on a STOP_QUIETLY_NO_SIGSTOP.
2008-07-11 17:46:40 +00:00
Pedro Alves 4f8d22e3b4 Exited threads.
* thread.c (enum thread_state): New.
	(thread_state main_thread_running): Delete, in favor of...
	(thread_state main_thread_state): ... this.  Update throughout.
	(clear_thread_inferior_resources): New, split from free_thread.
	(free_thread): Call clear_thread_inferior_resources.
	(init_thread_list): Set main thread to stopped state.
	(add_thread_silent): Take care of PTID reuses.
	(delete_thread): If deleting inferior_ptid or a thread with
	refcount > 0, mark it as exited, but still keep it in the list.
	Only notify of thread exits, if we haven't done so yet.
	(iterate_over_threads): Make it safe to delete threads while
	iterating over them.
	(do_captured_list_thread_ids): Don't account for exited threads.
	(thread_alive): Check for the THREAD_EXITED state, and don't set
	ptid to -1 on exited threads.
	(set_running): Update to account for extra possible states.
	(is_thread_state): New.
	(is_stopped, is_exited): New.
	(is_running): Implement in terms of is_thread_state.
	(any_running): Update.
	(print_thread_info): Update.  Account for exited threads.  Don't
	warn about missed frame restoring here, its done in the cleanup.
	(switch_to_thread): Don't read from a thread that has gone.
	(restore_current_thread): In non-stop mode, do a full context
	switch.
	(restore_selected_frame): Add a frame_level argument.  Rewrite.
	(struct current_thread_cleanup): Add selected_frame_level and
	was_stopped members.
	(do_restore_current_thread_cleanup): Check if thread was stopped
	and still is, and if the target has registers, stack and memory
	before restoring the selected frame.  Don't delete the cleanup
	argument here.
	(restore_current_thread_cleanup_dtor): New.
	(make_cleanup_restore_current_thread): Remove all arguments.
	Rewrite.
	(thread_apply_all_command): Update.  Prune threads.
	(thread_apply_command): Update.
	(thread_command): Account for currently selected exited thread.
	(do_captured_thread_select): Check for a running thread.  Prune
	threads.
	(_initialize_thread): Make "info threads", "thread", "thread
	apply", and "thread apply all" appliable without a selected thread.
	* gdbthread.h (struct thread_info): Replace running_ by state_.
	Add refcount.
	(is_exited, is_stopped): Declare.
	(make_cleanup_restore_current_thread): Remove all arguments.
	* infrun.c: Include "event-top.h".
	(fetch_inferior_event): In non-stop mode, restore selected thread
	and frame after handling the event and running breakpoint
	commands.  Display GDB prompt if needed.
	(normal_stop): In non-stop mode, don't print thread switching
	notice.
	* cli/cli-decode.c (set_cmd_no_selected_thread_ok)
	(get_cmd_no_selected_thread_ok): New.
	* cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): New.
	(set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
	Declare.
	* cli/cli-cmds.c: Set "pwd", "help", "info", "show" as
	no-selected-thread ok.
	* top.c (execute_command): Check for non no-selected-thread-ok
	commands.
	* linux-nat.c (struct saved_ptids, threads_to_delete)
	(record_dead_thread, prune_lwps): Delete.
	(exit_lwp): Unconditionally delete thread.
	(linux_nat_resume): Remove prune_lwps call.
	* infcmd.c (proceed_thread_callback): Check if !is_stopped instead
	of is_running.  Adjust to make_cleanup_restore_current_thread
	interface change.
	* mi/mi-main.c (mi_cmd_execute): Only allow a few commands if the
	selected thread has exited.
	* inf-loop.c (inferior_event_handler): Don't display the prompt
	here.
	* varobj.c (c_value_of_root): Update.
	* defs.h (make_cleanup_dtor): Declare.
	* utils.c (make_cleanup_dtor): New.

	* Makefile.in (infrun.o): Depend on $(event_top_h).
2008-07-11 11:07:39 +00:00
Pedro Alves 94cc34afe2 Non-stop inferior control.
* infrun.c (resume): In non-stop mode, always resume just one
	thread.
	(proceed): Don't call prepare_to_proceed in non-stop mode.
	(fetch_inferior_event): In non-stop mode, switch context before
	handling the event.
	(error_is_running, ensure_not_running): New.
	(handle_inferior_event): In non-stop mode: Mark only the event
	thread as stopped.  Require that the target module manages adding
	threads to the thread list.  Assert that there isn't a
	deferred_step_ptid set.  Don't switch to infwait_thread_hop_state.
	(normal_stop): Only mark not-running if inferior hasn't exited.
	In non-stop mode, only mark the event thread.

	* thread.c:Include "cli/cli-decode.h".
	(print_thread_info): Don't read from a running thread.
	Output "(running)" if thread is running.
	(switch_to_thread): Don't read stop_pc if thread is executing.
	(do_restore_current_thread_cleanup): Don't write to a running
	thread.
	(thread_apply_all_command): Don't read from a running thread.  In
	non-stop mode, do a full context-switch instead of just switching
	threads.
	(thread_apply_command): In non-stop mode, do a full context-switch
	instead of just switching threads.
	(do_captured_thread_select): Likewise.  Inform user if selected
	thread is running.
	(_initialize_thread): Mark "info threads" and "thread" and
	async_ok.

	* inf-loop.c (inferior_event_handler): In non-stop mode, don't
	unregister the target from the event loop.

	* infcmd.c (continue_command, step_1, jump_command)
	(signal_command): Ensure the selected thread isn't running.
	(interrupt_target_command): In non-stop mode, interrupt only the
	selected thread.

	* inferior.h (error_is_running, ensure_not_running): Declare.

	* target.h (struct target_ops): Add ptid argument to the to_stop
	member.
	(target_stop): Add ptid_t argument.

	* target.c (update_current_target): Add ptid argument to to_stop's
	type.
	(debug_to_stop): Add ptid_t argument.
	(debug_to_rcmd): Set to_stop_ptid.

	* remote.c (remote_stop): Add ptid_t argument.
	(async_remote_interrupt): Add inferior_ptid to target_stop.
	* inf-ptrace.c (inf_ptrace_stop): Add ptid argument.

	* Makefile.in (thread.o): Depend on $(cli_decode_h).
2008-07-09 22:42:43 +00:00
Pedro Alves 59f0d5d953 Don't rely on ecs->wait_for_more.
* infrun.c (proceed): Clear the stepping state, set
	previous_inferior_ptid and clear infwait state.
	(wait_for_inferior): Don't clear the stepping state, set
	previous_inferior_ptid, or clear the infwait state here.
	(fetch_inferior_event): Don't clear the stepping state, set
	previous_inferior_ptid, or clear the infwait state here.  Don't
	condition on wait_for_more.
2008-07-09 22:36:51 +00:00
Pedro Alves 0d1e5fa71a Refactor infrun a bit.
* infrun.c (currently_stepping): Take a struct
	thread_stepping_state instead of an execution_control_state.
	(struct thread_stepping_state): New, split from
	execution_control_state.
	(gtss, tss): New globals.
	(proceed): Clear the stepping state, set previous_inferior_ptid
	and clear infwait state.
	(init_wait_for_inferior): Clear the stepping state,
	previous_inferior_ptid and infwait state.
	(waiton_ptid, infwait_state): New, split from
	execution_control_state.
	(struct execution_control_state): Members that persist through
	events moved out to either struct thred_stepping_state or made
	global.  Deleted unneeded wp, saved_inferior_ptid, tmpstatus.
	(wait_for_inferior, fetch_inferior_event): Use local
	execution_control_state.  Update to execution_control_state split.
	(init_execution_control_state): Adjust.
	(init_thread_stepping_state): New, extracted from
	init_execution_control_state.
	(context_switch): Take a ptid instead of an
	execution_control_state.
	(context_switch_to): Adjust.
	(adjust_pc_after_break): Adjust.
	(init_infwait_state): New.
	(handle_inferior_event): Adjust.
2008-07-09 22:33:16 +00:00
Pedro Alves a474d7c2a3 Per-thread commands.
* gdbthread.h: Remove unneeded forward declarations.
	Include "inferior.h".
	(struct thread_info): Add continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi and stop_signal members.
	(save_infrun_state): Add continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi, stop_signal and stop_bpstat parameters.
	(load_infrun_state): Add continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi, stop_signal and stop_bpstat parameters.

	* thread.c (load_infrun_state): In non-stop mode, load
	continuations, intermediate_continuations, proceed_to_finish,
	step_over_calls, stop_step, step_multi and stop_signal.
	(save_infrun_state): Store continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi, stop_signal and stop_bpstat.
	(save_infrun_state): Store continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi, stop_signal and stop_bpstat.
	(free_thread): Clear The thread's stop_bpstat.

	* inferior.h (context_switch_to): Declare.

	* infrun.c (ecss): New global.
	(context_switch): Context switch continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi, stop_signal and stop_bpstat.
	(wait_for_inferior): Use global ecss.
	(async_ecss, async_ecs): Delete.
	(fetch_inferior_event): Use global ecss.
	(context_switch_to): New.

	* top.c (execute_command): In non-stop, only check if the current
	thread is running, in all-stop, check if there's any thread
	running.

	* breakpoint.c (bpstat_remove_breakpoint): New.
	(bpstat_remove_breakpoint_callback): New.
	(delete_breakpoint): Clear the stop_bpstats of all threads.

	* mi/mi-main.c (mi_cmd_execute): In non-stop, only check if the
	current thread is running, in all-stop, check if there's any
	thread running.

	* Makefile.in (gdbthread_h): Depend on $(inferior_h).
2008-07-09 22:30:46 +00:00
Pedro Alves ad52ddc6a4 Add non_stop global.
* inferior.h (non_stop): Declare.
	* infrun.c (non_stop, non_stop_1): New.
	(set_non_stop, show_non_stop): New.
	(_initialize_infrun): Add "set/show non-stop" command.
2008-07-09 22:27:13 +00:00
Pedro Alves 3a3e9ee36f Adjust fork/vfork/exec to pass ptids around.
* target.h (struct target_waitstatus): Store related_pid as a ptid.
	(inferior_has_forked, inferior_has_vforked, inferior_has_execd):
	Take a ptid_t.
	* breakpoint.h (struct breakpoint): Change forked_inferior_pid
	type to ptid.
	* breakpoint.c (print_it_typical, bpstat_check_location)
	(print_one_breakpoint_location, set_raw_breakpoint_without_location)
	(create_fork_vfork_event_catchpoint): Adjust.
	* infrun.c (fork_event): Change parent_pid and child_pid types to
	ptid.
	(follow_exec, inferior_has_forked, inferior_has_vforked)
	(inferior_has_execd): Take a ptid_t and don't trim it.
	* linux-thread-db.c (thread_db_wait): Don't trim the returned ptid.
	* linux-nat.c (linux_child_follow_fork): Adjust.
	* inf-ptrace.c (inf_ptrace_wait): Adjust.
	* inf-ttrace.c (inf_ttrace_wait): Adjust.
	* win32-nat.c (get_win32_debug_event): Don't set related_pid.
2008-07-09 22:23:05 +00:00
Pedro Alves 8ea051c51f Add "executing" property to threads.
* inferior.h (target_executing): Delete.
	* gdbthread.h (struct thread_info): Add executing_ field.
	(set_executing, is_executing): New.
	* thread.c (main_thread_executing): New.
	(init_thread_list): Clear it and also main_thread_running.
	(is_running): Return false if target has no execution.
	(any_running, is_executing, set_executing): New.

	* top.c: Include "gdbthread.h".
	(target_executing): Delete.
	(execute_command): Replace target_executing check by any_running.
	* event-top.c: Include "gdbthread.h".
	(display_gdb_prompt, command_handler): Replace target_executing by
	is_running.
	* inf-loop.c: Include "gdbthread.h".  Don't mark as not executing
	here.  Replace target_executing by is_running.
	* infrun.c (handle_inferior_event): Mark all threads as
	not-executing.
	* linux-nat.c (linux_nat_resume): Don't mark thread as executing
	here.
	* stack.c (get_selected_block): Return null if inferior is
	executing.
	* target.c (target_resume): Mark resumed ptid as executing.
	* breakpoint.c (until_break_command): Replace target_executing
	check by is_executing.
	* remote.c (remote_async_resume): Don't mark inferior as executing
	here.
	* mi/mi-interp.c (mi_cmd_interpreter_exec): Replace target_executing
	by any_running.

	* mi/mi-main.c (mi_cmd_exec_interrupt, mi_cmd_execute)
	(mi_execute_async_cli_command): Replace target_executing by
	is_running.

	* frame.c (get_current_frame): Error out if the current thread is
	executing.
	(has_stack_frames): New.
	(get_selected_frame, deprecated_safe_get_selected_frame): Check
	has_stack_frames.

	* Makefile.in (event-top.o, frame.o, inf-loop.o, top.o): Depend on
	$(gdbthread_h).
2008-07-09 22:16:15 +00:00
Pedro Alves cce9b6bff9 * infrun.c (follow_exec): Reset shared libraries before adding the
main exec file.
2008-07-08 10:31:16 +00:00
Vladimir Prus 20874c92f8 * breakpoint.c (moribund_locations): New.
(bpstat_stop_status): Process moribund locations.
        (update_global_location_list): Add removed
        locations to moribund_locations.
        (breakpoint_retire_moribund): New.
        * breakpoint.h (struct bp_location): New field
        events_till_retirement.
        (breakpoint_retire_moribund): Declare.
        * thread.c (thread_count): New.
        * infrun.c (handle_inferior_event): Call
        breakpoint_retire_moribund.
        * gdbthread.h (thread_count): Declare.
2008-06-28 09:42:15 +00:00
Pedro Alves c0a2216eb3 * infrun.c (start_remote): Don't clear thread list here.
* monitor.c (monitor_open): Include "gdbthread.h".  Clear thread
	list here.
	* remote.c (record_currthread): Upgrade the main thread and its
	entry in the thread list if this is the first time we hear about
	threads.
	(remote_thread_alive): Consider magic_null_ptid or a ptid without
	a tid member always alive.
	(remote_find_new_threads): Don't update the main thread here.
	(remote_start_remote): Clear thread list here.  Always add the
	main thread.
	(extended_remote_attach_1): Add the main thread here.
	(extended_remote_mourn_1): Re-add the main thread here.
	(extended_remote_create_inferior_1): Add a main thread.

	* Makefile.in (monitor.o): Depend on $(gdbthread_h).
2008-06-27 11:54:21 +00:00
Michael Snyder 1f41b06255 2008-06-24 Michael Snyder <msnyder@specifix.com>
* infrun.c (_initialize_infrun): White space and typo fix.
2008-06-24 19:30:18 +00:00
Vladimir Prus 8f6a8e8417 Don't suppress *running when doing finish.
* infcall.c (call_function_by_hand): Set both
        suppress_resume_observer and suppress_stop_observer.
        * infcmd.c (suppress_run_stop_observers): Split into...
        (suppress_resume_observer, suppress_stop_observer): ...those.
        (finish_command_continuation): Clear suppress_stop_observer.
        (finish_command): Set suppress_stop_observer.
        * inferior.h (suppress_run_stop_observers): Split into...
        (suppress_resume_observer, suppress_stop_observer): ...those.
        * infrun.c (normal_stop): Check for suppress_stop_observer.
        * thread.c (set_running): Check for suppress_resume_observer.
2008-06-13 20:19:19 +00:00
Vladimir Prus e1ac332873 Implement *running.
* Makefile.in: Update dependencies.
        * gdbthread.h (struct thread_info): New field
        running_.
        (set_running, is_running): New.
        * thread.c (set_running, is_running): New.
        * inferior.h (suppress_normal_stop_observer): Rename to...
        (suppress_run_stop_observers): ..this.
        * infcmd.c (suppress_normal_stop_observer): Rename to...
        (suppress_run_stop_observers): ..this.
        (finish_command_continuation, finish_command): Adjust.
        * infcall.c (call_function_by_hand): Adjust.
        * infrun.c (normal_stop): Call set_running.
        * target.c (target_resume): New.  Call set_running.
        * target.h (target_resume): Convert from macro to
        a function.

        * mi/mi-interp.c (mi_on_resume): New.
        (mi_interpreter_init): Register mi_on_resume.
2008-06-10 10:23:54 +00:00
Vladimir Prus f5871ec07b Suppress normal stop observer when it's problematic.
* inferior.h (suppress_normal_stop_observer): New.
        * infcall.c (call_function_by_hand): Disable stop events when
        doing function calls.
        * infmcd.c (suppress_normal_stop_observer): New.
        (finish_command_continuation): Call normal_stop observer
        explicitly.
        (finish_command): Disable stop events inside proceed.
        * infrun.c (normal_stop): Don't call normal stop observer if
        suppressed of if multi-step is in progress.
2008-06-10 09:32:05 +00:00
Nick Roberts b8fa951a9b * annotate.c (annotate_thread_changed): New function.
* thread.c (thread_command) : Use it.
* infrun.c (normal_stop): Use it.
2008-06-06 00:33:52 +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
Ulrich Weigand 515630c5e5 * inferior.h (read_pc_pid, write_pc_pid): Remove.
* regcache.h (regcache_read_pc, regcache_write_pc): Add prototypes.

	* regcache.c (read_pc_pid): Remove, replace by ...
	(regcache_read_pc): ... this function.
	(write_pc_pid): Remove, replace by ...
	(regcache_write_pc): ... this function.
	(read_pc, write_pc): Update.

	* infrun.c (displaced_step_prepare): Replace read_pc_pid and
	write_pc_pid by regcache_read_pc and regcache_write_pc.
	(displaced_step_fixup): Likewise.
	(resume): Likewise.  Use regcache arch instead of current_gdbarch.
	(prepare_to_proceed): Likewise.
	(proceed): Likewise.
	(adjust_pc_after_break): Likewise.
	(handle_inferior_event): Likewise.

	* linux-nat.c (cancel_breakpoint): Likewise.
	* linux-thread-db.c (check_event): Likewise.
	* aix-thread.c (aix_thread_wait): Likewise.
	* tracepoint.c (trace_dump_command): Likewise.
2008-05-04 14:12:34 +00:00
Ulrich Weigand 0b02b92d05 * infrun.c (handle_inferior_event): Do not insert breakpoints at
TARGET_WAITKIND_LOADED events during startup (i.e. in the shell).
2008-05-03 23:18:23 +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
Andrew Stubbs d01a8610c3 2008-05-02 Andrew Stubbs <andrew.stubbs@st.com>
* main.h (batch_silent): Declare.
	* event-top.c: Include main.h.
	(gdb_setup_readline): Remove extern batch_silent declaration.
	* infrun.c (normal_stop): Don't print source location when running in
	--batch-silent mode.
	* Makefile.in (event-top.o): Add main.h dependency.
2008-05-02 13:58:38 +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
Pedro Alves 78b6a73194 * breakpoint.h (enum bpstat_what_main_action): Delete
BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE.

	* breakpoint.c (clrs): Delete.
	(bpstat_what): Update table.

	* infrun.c (handle_inferior_event): Remove
	BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE handling.
2008-04-25 14:50:10 +00:00
Vladimir Prus f107f56344 exec_cleanup murder.
* breakpoint.c (until_break_command_continuation): Add
	the 'error' parameter.  Directly delete the breakoint as
	opposed to running cleanups.
	(until_break_command): Install continuation only
	after starting the target.  Don't use exec cleanups,
	use ordinary cleanups.  Discard cleanups is successfully
	started the target in async mode.
	(make_cleanup_delete_breakpoint): Remove.
	* breakpoint.h (make_cleanup_delete_breakpoint): Remove
	declaration.
	* defs.h (do_exec_cleanups, make_exec_cleanup): Remove
	declarations.
	(struct continations): Add the 'error' parameter to the
	continuation_hook field.
	(add_continuation, do_all_continuations)
	(add_intermediate_continuation)
	(do_all_intermediate_continuations): Add the 'error' parameter.
	* exceptions.c (throw_exception): Don't call do_exec_cleanups.
	* inf-loop.c (inferior_event_handler): Instead of calling
	discard_all_continuations, use do_all_continuations with 1 as
	'error' parameter.  Pass 0 as 'error' parameter in existing uses
	of discard_all_continuations.
	* infcmd.c (step_1): Do not use exec cleanup.  For async case, discard
	cleanups.
	(step_once): Install continuation only after resuming the target.
	(step_1_continuation): Disable longjmp breakpoint on error.
	(finish_command_continuation): Add the error parameter.  Delete
	the finish breakpoint directly, do not use cleanups.
	(finish_command): Do not use exec_cleanups. Always setup
	continuation.  For sync case, immediately run them.
	(attach_command_continuation): Add the error parameter.
	* infrun.c (fetch_inferior_event): Do not use exec cleanups to
	remove step_resume_breakpoint -- adjust delete it directly.
	* interps.c (interp_set): Adjust call to do_all_continations.
	* mi/mi-interp.c (mi_interpreter_exec_continuation): Do not
	do exec cleanups.
	* mi/mi-main.c (mi_cmd_target_select): Do not do exec
	cleanups.
	(mi_cmd_execute): Do not use exec_cleanup.
	(mi_execute_async_cli_command): Simplify the string concatenation
	logic.  Do no use exec cleanup.
	(mi_exec_async_cli_cmd_continuation): New parameter error.
	Free last_async_command.
	* top.c (command_line_handler_continuation): New parameter error.
	* utils.c (exec_cleanup_chain, make_exec_cleanup)
	(do_exec_cleanups): Remove.
	(add_continuation, do_all_continations)
	(add_intermediate_continuation)
	(do_all_intermediate_continuations): New parameter error.
2008-04-24 11:13:44 +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
Aleksandar Ristovski 2cec12e55b PR gdb/2424
* infrun.c (normal_stop) Move breakpoint_auto_delete further down
	to allow printing to 'see' real reason of stop. This fixes PR 2424.
	* breakpoint.c (bpdisp_texst): New function. The function takes over
	the role of bpstats static array in print_one_breakpoint_location.
	(print_it_typical): Print "Temporary breakpoint" instead
	of just "Breakpoint" when breakpoint is, well, temporary. For mi-like
	protocols, print disp field.
	(print_one_breakpoint_location): Removed bpdisps static definition.
	Call new bpstat_text function to get value for 'disp' field.
	(mention): Print "Temporary breakpoint" instead of just "Breakpoint".
2008-04-15 14:32:12 +00:00
Vladimir Prus 6cf327044d Remove ignoring leading exec events code.
* fork-child.c (startup_inferior): Do not set
        inferior_ignoring_leading_exec_events.
        * inf-child.c (inf_child_reported_exec_events_per_exec_call): Remove.
        (inf_child_target): Do not set to_reported_exec_events_per_exec_call.
        * infrun.c (inferior_ignoring_leading_exec_events): Remove.
        (handle_inferior_event): Remove code for ignoring leading exec
        events.
        * target.c (update_current_target): Do not inherit, or default,
        to_reported_exec_events_per_exec_call.
        (debug_to_reported_exec_events_per_exec_call): Remove.
        (setup_target_debug): Do not set to_reported_exec_events_per_exec_call.
        * target.h (target_reported_exec_events_per_exec_call): Remove.
        (struct target): Remove the to_reported_exec_events_per_exec_call
        field.
2008-03-15 14:55:21 +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
Joel Brobecker ae123ec613 * infrun.c (wait_for_inferior): Add treat_exec_as_sigtrap parameter
and use it.
        (proceed, start_remote): Update call to wait_for_inferior.
        * inferior.h (wait_for_inferior): Update declaration.
        * fork-child.c, infcmd.c, solib-irix.c, solib-osf.c, solib-sunos.c,
        solib-svr4.c, win32-nat.c: Update calls to wait_for_inferior.
        * inf-ttrace.c (inf_ttrace_wait): Report TTEVT_EXEC events as
        TARGET_WAITKIND_EXECD instead of TARGET_WAITKIND_STOPPED.
2008-01-29 21:11:24 +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
Vladimir Prus 9d9cd7ac81 * infrun.c (handle_inferior_event): If
we failed to remove breakpoints, error,
	don't try to increment PC by hand.
2008-01-21 16:34:00 +00:00
Daniel Jacobowitz 9b254dd1ce Updated copyright notices for most files. 2008-01-01 22:53:26 +00:00
Joel Brobecker 1ce9f7f229 * infrun.c (handle_inferior_event): Remove code that made us
stop when stepping into the last line of the current function.
2007-12-23 05:34:38 +00:00
Joel Brobecker b50d744268 * infrun.c (handle_inferior_event): Fix spelling in comment. 2007-12-19 05:16:36 +00:00
Vladimir Prus c95310c6b8 * target.h (target_pid_or_tid_to_str): Remove.
* infrun.c (handle_inferior_event):
        Use target_pid_to_str instead of
	target_pid_or_tid_to_str.
	(normal_stop): Likewise.
2007-12-16 19:14:23 +00:00
Daniel Jacobowitz ca005067ce * infrun.c (init_wait_for_inferior): Reset target_last_wait_ptid.
(handle_inferior_event): Clear stop_stack_dummy earlier.
2007-12-07 00:44:27 +00:00
Vladimir Prus 45e8c884b5 Localize infrun use of remove_breakpoints.
* infrun.c (handle_inferior_event): Remove
	calls to remove_breakpoints, except where needed to
	communicate change of breakpoint locations to inferior.
	(keep_going): If steppping over breakpoint, remove
	breakpoints.
2007-12-06 13:47:56 +00:00
Vladimir Prus ca67fcb81a Clarify infrun variable naming.
* infrun.c (trap_expected): Rename
	to stepping_over_breakpoint.  Document.
	(stepping_past_breakpoint): Remove.
	(stepping_past_breakpoint_ptdi): Renamed
	to deferred_step_ptid.
	(struct execution_control_state): Rename
	the another_trap field to stepping_over_breakpoint.
	(struct inferior_status): Rename the trap_expected
	field to stepping_over_breakpoint.
	(clear_proceed_status, proceed)
	(init_execution_control_state, context_switch)
	(handle_inferior_event, currently_stepping)
	(keep_going, save_inferior_status)
	(restore_inferior_status, prepare_to_proceed): Adjust.
	* gdbthread.h (struct thread_info): Rename the
	trap_expected field to stepping_over_breakpoint.
	* thread.c (load_infrun_state, save_infrun_state):
	Adjust.
2007-12-06 12:57:51 +00:00
Vladimir Prus fba57f8f38 * infrun.c (handle_inferior_event): Don't
ignore beakpoints if trap_expected is set.
2007-11-30 10:03:16 +00:00
Vladimir Prus e236ba4424 Make insert_breakpoints return void.
* breakpoint.h (insert_breakpoints): Change
	return type to void.
	* breakpoint.c (insert_breakpoints): Change
	return type to void.  Rename local return_val
	variable to error.
	* infrun.c (keep_going): Instead of checking
	return value from insert_breakpoints, catch exception.
2007-11-30 10:00:26 +00:00
Vladimir Prus c36b740af1 Stop infrun from tracking breakpoint insertion status.
The checks of breakpoints_inserted before calling
	remove_breakpoints are removed, as remove_breakpoint
	won't touch uninserted breakpoints. In a number of places,
	we're interested if a breakpoint is inserted at particular
	PC, and we now use breakpoint_inserted_here_p.  In a few
	places, insert_breakpoints can be called unconditionally,
	since it won't try to insert already inserted breakpoint.

	* breakpoint.h (regular_breakpoint_inserted_here_p): New
	declaration.
	* breakpoint.c (regular_breakpoint_inserted_here_p): New.
	(breakpoint_inserted_here_p): Use
	regular_breakpoint_inserted_here_p.
	* infrun.c (breakpoints_inserted): Remove.
	(resume): Don't check for breakpoints_inserted before
	remove_hw_watchpoints. Use breakpoint_inserted_here_p.
	(proceed, init_wait_for_inferior): Don't set breakpoints_inserted.
	(handle_inferior_event): Don't use breakpoints_inserted.
	Use breakpoints_meant_to_be_inserted and
	breakpoints_inserted_here_p.
	(insert_step_resume_breakpoint_at_sal, keep_going): Use
	breakpoints_meant_to_be_inserted. Don't set breakpoints_inserted.
	(normal_stop): Don't check for breakpoints_inserted.  Don't
	set breakpoints_inserted.
	(keep_going): Don't check for breakpoints_inserted.
	(insert_step_resume_breakpoint_at_sal): Don't insert
	breakpoints
2007-11-29 07:48:21 +00:00
Vladimir Prus e842223a72 * infrun.c (resume): Set right thread even if
stepping over breakpoint using software single step.
2007-11-28 12:49:55 +00:00
Vladimir Prus cd76b0b7c4 * infrun.c (resume): Clarify logic that
decides if a single thread must be resumed. Add
	comments.
2007-11-20 08:18:47 +00:00
Ulrich Weigand 09a7aba80a 2007-11-02 Markus Deuling <deuling@de.ibm.com>
* frame.c (frame_id_inner): Add gdbarch parameter. Replace
	current_gdbarch by gdbarch.
	(frame_find_by_id, get_prev_frame_1): Use get_frame_arch to get at the
	current architecture by frame_info.
	* frame.h (frame_id_inner): Add gdbarch parameter.
	* stack.c (return_command): Use get_frame_arch to get at the current
	architecture by frame_info. Update call of frame_id_inner.
	* infrun.c (handle_inferior_event): Likewise.
	* dummy-frame.c (dummy_frame_push):  Use get_regcache_arch to get at the
	current architecture by regcache. Update call of frame_id_inner.
2007-11-02 14:47:28 +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 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
Joel Brobecker f4c1edd8e5 * infrun.c (insert_step_resume_breakpoint_at_frame): Add assertion
that return_frame is not null.
2007-09-17 19:44:20 +00:00
Ulrich Weigand 6a6b96b9c2 * infrun.c (stepping_past_breakpoint): New global variable.
(stepping_past_breakpoint_ptid): Likewise.
	(prepare_to_proceed): Add STEP parameter.  Do not check for Ctrl-C.
	Only switch threads if we need to single-step over a breakpoint hit
	in the previously selected thread.  If stepping, remember previous
	thread to switch back to in STEPPING_PAST_BREAKPOINT[_PTID].  Call
	switch_to_thread instead of copying its contents.
	(proceed): Pass STEP to prepare_to_proceed.  Always set ONEPROC if
	prepare_to_proceed returns true.
	(init_wait_for_inferior): Reset STEPPING_PAST_BREAKPOINT.
	(context_switch): Call switch_to_thread.
	(handle_inferior_event): Switch back to previous thread if requested
	in STEPPING_PAST_BREAKPOINT[_PTID] by prepare_to_proceed.
	* gdbthread.h (switch_to_thread): Add prototype.
	* thread.c (switch_to_thread): Make global.
2007-09-10 18:49:26 +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
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
Ulrich Weigand 1c0fdd0e37 * infrun.c (adjust_pc_after_break): Do not assume software single-step
is always active if SOFTWARE_SINGLE_STEP_P is true.
	(resume): Use gdbarch_software_single_step[_p] instead of
	SOFTWARE_SINGLE_STEP[_P].
	(handle_inferior_event): Do not check for SOFTWARE_SINGLE_STEP_P.

	* gdbarch.sh (software_single_step): Remove target macro.
	* gdbarch.h, gdbarch.c: Regenerate.
2007-06-22 12:47:48 +00:00
Ulrich Weigand d5c3145792 * infrun.c (clear_proceed_status): Clean up stop_registers.
(normal_stop): Allocate regcache for stop_registers.
	(struct inferior_status): Remove stop_registers member.
	(save_inferior_status): Do not save stop_registers.
	(restore_inferior_status): Do not restore stop_registers.
	(discard_inferior_status): Do not discard stop_registers.
	(build_infrun): Remove.
	(_initialize_infrun): Do not swap stop_registers.
2007-06-22 12:38:04 +00:00
Ulrich Weigand cbf3b44a9f 2007-06-18 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (DEPRECATED_FUNCTION_START_OFFSET): Replace by
	gdbarch_deprecated_function_start_offset.
	* symtab.c (find_function_start_sal)skip_prologue_using_sal): Likewise.
	* linespec.c (minsym_found): Likewise.
	* infrun.c (handle_inferior_event): Likewise.
	* infcall.c (find_function_addr): Likewise.
	* cli/cli-cmds.c (disassemble_command): Likewise.
	* gdbarch.c, gdbarch.h: Regenerate.
2007-06-18 18:23:08 +00:00
Ulrich Weigand 594f77850b * regcache.c (struct regcache): Add ptid_t member.
(regcache_xmalloc): Initialize it.
	(regcache_cpy_no_passthrough): Do not refer to current_regcache.
	(regcache_dup): Likewise.
	(regcache_dup_no_passthrough): Likewise.
	(current_regcache): Make static.
	(registers_ptid): Remove variable.
	(get_thread_regcache): New function.
	(get_current_regcache): New function.
	(registers_changed): Implement by freeing current regcache.
	(regcache_raw_read): Do not refer to current_regcache.  Set
	inferior_ptid to regcache->ptid while calling target routines.
	(regcache_raw_write): Likewise.
	(regcache_raw_supply): Do not refer to current_regcache.
	(read_pc_pid): Use thread regcache.  Do not modify inferior_ptid.
	(write_pc_pid): Likewise.
	(build_regcache): Remove.
	(_initialize_regcache): Do not call DEPRECATED_REGISTER_GDBARCH_SWAP
	or deprecated_register_gdbarch_swap.  Do not initialize
	registers_ptid.
	* regcache.h (get_current_regcache): Add prototype.
	(get_thread_regcache): Likewise.
	(current_regcache): Remove declaration.

	* corelow.c (core_open): Replace current_regcache by
	get_current_regcache ().
	* frame.c (frame_pop): Likewise.
	(put_frame_register): Likewise.
	(get_current_frame, create_new_frame): Likewise.
	* mi/mi-main.c (mi_cmd_data_write_register_values): Likewise.
	* stack.c (return_command): Likewise.
	* infcall.c (call_function_by_hand): Likewise.
	* infrun.c (resume): Likewise.
	(save_inferior_status, restore_inferior_status): Likewise.
	* linux-fork.c (fork_load_infrun_state): Likewise.
	(fork_save_infrun_state): Likewise.
	* win32-nat.c (win32_resume): Likewise.
	* i386fbsd-nat.c (i386fbsd_resume): Likewise.
	* monitor.c (monitor_wait): Likewise.
	* remote.c (remote_wait): Likewise.
	* remote-mips.c (mips_wait): Likewise.

	* bsd-kvm.c (bsd_kvm_open): Likewise
	(bsd_kvm_proc_cmd, bsd_kvm_pcb_cmd): Likewise.
	* fbsd-nat.c (fbsd_make_corefile_notes): Likewise.
	* i386-linux-nat.c (i386_linux_resume): Likewise.
	* ia64-linux-nat.c (ia64_linux_insert_watchpoint): Likewise.
	(ia64_linux_stopped_data_address): Likewise.

	* frv-tdep.c (frv_fdpic_loadmap_addresses): Likewise.
	* m32c-tdep.c (m32c_virtual_frame_pointer): Likewise.
	* mep-tdep.c (current_me_module, current_options): Likewise.
	* mips-tdep.c (deprecated_mips_set_processor_regs_hack): Likewise.

	* linux-nat.c (linux_nat_do_thread_registers): Use thread
	regcache instead of current_regcache.  Call target_fetch_registers.
	(linux_nat_corefile_thread_callback): Update call site.
	(linux_nat_do_registers): Likewise.
	* procfs.c (procfs_do_thread_registers): Use thread regcache instead
	of current_regcache.
	(procfs_make_note_section): Likewise.
	* proc-service.c (ps_lgetregs, ps_lsetregs): Likewise.
	(ps_lgetfpregs, ps_lsetfpregs): Likewise.
	* sol-thread.c (ps_lgetregs, ps_lsetregs): Likewise.
	(ps_lgetfpregs, ps_lsetfpregs): Likewise.
2007-06-16 17:16:26 +00:00
Ulrich Weigand 60ade65d49 * gdbarch.sh (get_longjmp_target): Add FRAME argument.
* gdbarch.c, gdbarch.h: Regenerate.
	* infrun.c (handle_inferior_event): Pass current frame to
	gdbarch_get_longjmp_target.

	* alpha-tdep.c (alpha_get_longjmp_target): Add FRAME argument.
	Read registers from FRAME instead of using read_register.
	Use get_frame_arch instead of current_gdbarch.
	* arm-tdep.c (arm_get_longjmp_target): Likewise.
	* i386-tdep.c (i386_get_longjmp_target): Likewise.
	* m68k-tdep.c (m68k_get_longjmp_target): Likewise.
	* mips-linux-tdep.c (mips_linux_get_longjmp_target): Likewise.
	(mips64_linux_get_longjmp_target): Likewise.
	* mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Likewise.
2007-06-15 22:41:13 +00:00
Ulrich Weigand 52f729a724 * gdbarch.sh (skip_trampoline_code): Add FRAME argument.
* gdbarch.c, gdbarch.h: Regenerate.
	* arch-utils.c (generic_skip_trampoline_code): Add FRAME argument.
	* arch-utils.h (generic_skip_trampoline_code): Likewise.
	* infrun.c (handle_inferior_event): Pass current frame to
	gdbarch_skip_trampoline_code and skip_language_trampoline.

	* language.c (unk_lang_trampoline): Add FRAME argument.
	(skip_language_trampoline): Add FRAME argument.  Pass it to
	skip_trampoline callback.
	* language.h: Add forward declaration of struct frame_info.
	(struct language_defn): Add FRAME argument to skip_trampoline.
	(skip_language_trampoline): Add FRAME argument.
	* cp-abi.c (cplus_skip_trampoline): Add FRAME argument.  Pass it
	to skip_trampoline callback.
	* cp-abi.h: Add forward declaration of struct frame_info.
	(cplus_skip_trampoline): Add FRAME argument.
	(struct cp_abi_ops): Add FRAME argument to skip_trampoline callback.
	* gnu-v3-abi.c (gnuv3_skip_trampoline): Add FRAME argument.  Pass it
	to gdbarch_skip_trampoline_code.
	* objc-lang.c (objc_skip_trampoline): Add FRAME argument.  Pass it
	to gdbarch_skip_trampoline_code.

	* minsyms.c (find_solib_trampoline_target): Add FRAME argument.
	* symtab.h (find_solib_trampoline_target): Likewise.
	* obsd-tdep.c (obsd_skip_solib_resolver): Pass current frame to
	find_solib_trampoline_target.

	* arm-tdep.c (arm_skip_stub): Add FRAME argument.  Read registers
	from FRAME instead of calling read_register.

	* hppa-hpux-tdep.c (hppa_hpux_skip_trampoline_code): Add FRAME
	argument.  Read registers from FRAME instead of using read_register.
	* hppa-tdep.c (hppa_skip_trampoline_code): Likewise.
	* hppa-tdep.h (hppa_skip_trampoline_code): Add FRAME argument.

	* i386-cygwin-tdep.c (i386_cygwin_skip_trampoline_code): Add FRAME
	argument.

	* m32c-tdep.c (m32c_skip_trampoline_code): Add FRAME argument.

	* mips-tdep.c (mips_skip_trampoline_code): Add FRAME argument.  Read
	registers from FRAME instead of using read_signed_register.

	* ppc-linux-tdep.c (ppc_linux_skip_trampoline_code): Add FRAME
	argument.
	(ppc64_standard_linkage_target): Likewise.  Read registers from FRAME
	instead of using read_register.
	(ppc64_skip_trampoline_code): Add FRAME argument.  Pass it to
	ppc64_standard_linkage_target.
	* rs6000-tdep.c (rs6000_skip_trampoline_code): Add FRAME argument.
	Pass it to find_solib_trampoline_target.  Read registers from FRAME
	instead of using read_register.

	* xstormy16-tdep.c (xstormy16_skip_trampoline_code): Add FRAME
	argument.
2007-06-15 22:39:52 +00:00
Ulrich Weigand 0b1b3e423a * gdbarch.sh (software_single_step): Replace REGCACHE argument by
FRAME argument.
	* gdbarch.c, gdbarch.h: Regenerate.
	* infrun.c (resume): Pass current frame to SOFTWARE_SINGLE_STEP.

	* alpha-tdep.c (alpha_next_pc): Add FRAME argument.  Retrieve
	registers from FRAME instead of using read_register.
	(alpha_software_single_step): Replace REGCACHE by FRAME.  Pass FRAME
	to alpha_next_pc.  Use get_frame_pc instead of read_pc.
	* alpha-tdep.h (alpha_software_single_step): Replace REGCACHE
	argument by FRAME.

	* arm-tdep.c (shifted_reg_val): Add FRAME argument.  Read registers
	from FRAME instead of using read_register.
	(thumb_get_next_pc): Likewise.
	(arm_get_next_pc): Likewise.
	(arm_software_single_step): Replace REGCACHE by FRAME.  Pass FRAME
	to arm_get_next_pc.  Use get_frame_pc instead of read_register.
	* arm-tdep.h (arm_software_single_step): Replace REGCACHE
	argument by FRAME.

	* cris-tdep.c (find_step_target): Add FRAME argument.  Read registers
	from FRAME instead of using read_register.
	(cris_software_single_step): Replace REGCACHE by FRAME.  Pass FRAME
	to find_step_target.

	* mips-tdep.c (mips32_next_pc): Add FRAME argument.  Read registers
	from FRAME instead of using read_register / read_signed_register.
	(extended_mips16_next_pc): Likewise.
	(mips16_next_pc): Likewise.
	(mips_next_pc): Likewise.
	(mips_software_single_step): Replace REGCACHE by FRAME.  Pass FRAME
	to mips_next_pc.  Use get_frame_pc instead of read_pc.
	* mips-tdep.h (mips_software_single_step): Replace REGCACHE
	argument by FRAME.

	* rs6000-tdep.c (branch_dest): Add FRAME argument.  Use it instead
	of current frame.  Read registers from FRAME.
	(deal_with_atomic_sequence): Add FRAME argument.  Pass it to
	branch_dest.  Use get_frame_pc instead of read_pc.
	(rs6000_software_single_step): Likewise.
	(bl_to_blrl_insn_p): Do not call branch_dest.
	* rs6000-tdep.h (rs6000_software_single_step): Replace REGCACHE
	argument by FRAME.

	* sparc64-linux-tdep.c (sparc64_linux_step_trap): Add FRAME argument.
	Read registers from FRAME instead of current regcache.
	* sparc-linux-tdep.c (sparc32_linux_step_trap): Likewise.
	* sparcnbsd-tdep.c (sparcnbsd_step_trap): Likewise.
	* sparc-tdep.c (sparc_address_from_register): Remove.
	(sparc_analyze_control_transfer): Pass FRAME argument instead of
	GDBARCH.  Pass FRAME to step_trap callback.
	(sparc_step_trap): Add FRAME argument.
	(space_software_single_step): Replace REGCACHE by FRAME.  Pass FRAME
	to sparc_analyze_control_transfer.  Read registers from FRAME instead
	of calling sparc_address_from_register.
	* sparc-tdep.h (struct gdbarch_tdep): Add FRAME argument to
	step_trap callback.
	(sparc_address_from_register): Remove prototype.
	(sparc_software_single_step): Replace REGCACHE argument by FRAME.
	(sparcnbsd_step_trap): Add FRAME argument.

	* spu-tdep.c (spu_software_single_step): Replace REGCACHE argument
	by FRAME.  Read registers from FRAME instead of REGCACHE.
2007-06-15 22:37:35 +00:00
Ulrich Weigand e76f05face 2007-06-09 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (SKIP_TRAMPOLINE_CODE): Replace by
	gdbarch_skip_trampoline_code.
	* rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise (comment).
	* objc-lang.c (objc_skip_trampoline)
	(objc_submethod_helper_data): Likewise.
	* m32c-lang.c (m32c_skip_trampoline_code): Likewise (comment).
	* infrun.c (handle_inferior_event): Likewise.
	* gnu-v3-abi.c (gnuv3_skip_trampoline): Likewise.
	* gdbarch.sh (IN_SOLIB_RETURN_TRAMPOLINE): Replace by
	gdbarch_in_solib_return_trampoline.
	* rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise (comment).
	* infrun.c (handle_inferior_event): Likewise.
	* hppa-tdep.c (hppa_stub_unwind_sniffer): Likewise.
	* gdbarch.c, gdbarch.h: Regenerate.
2007-06-09 14:20:24 +00:00
Ulrich Weigand a433963dd5 2007-06-09 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (SKIP_PROLOGUE): Replace by gdbarch_skip_prologue.
	* symtab.c (find_function_start_sal, in_prologue): Likewise.
	* linespec.c (minsym_found): Likewise.
	* infrun.c (step_into_function): Likewise.
	* gdbarch.c, gdbarch.h: Regenerate.
2007-06-09 14:15:52 +00:00
Ulrich Weigand b798847d06 2007-06-09 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (DECR_PC_AFTER_BREAK): Replace by
	gdbarch_decr_pc_after_break.
	* tracepoint.c (trace_dump_command): Likewise.
	* solib-sunos.c (sunos_solib_create_inferior_hook): Likewise.
	* linux-thread-db.c (check_event): Likewise.
	* linux-nat.c (cancel_breakpoints_callback): Likewise.
	* infrun.c (adjust_pc_after_break, normal_stop): Likewise.
	* frame.h: Likewise (comment).
	* dummy-frame.c (deprecated_pc_in_call_dummy): Likewise.
	* aix-thread.c (aix_thread_wait): Likewise.
	* gdbarch.c, gdbarch.h: Regenerate.
2007-06-09 13:55:51 +00:00
Ulrich Weigand bf6ae4641c 2007-06-09 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (ADDR_BITS_REMOVE): Replace by gdbarch_addr_bits_remove.
	* value.c (value_as_address): Likewise (comment).
	* remote-mips.c (common_breakpoint): Likewise.
	* regcache.c (read_pc_pid): Likewise.
	* printcmd.c (do_one_display): Likewise.
	* monitor.c (monitor_write_memory, monitor_read_memory)
	(monitor_insert_breakpoint): Likewise.
	* mips-tdep.c (heuristic_proc_start): Likewise.
	* infrun.c (insert_step_resume_breakpoint_at_frame)
	(insert_step_resume_breakpoint_at_caller): Likewise.
	* buildsym.c (record_line): Likewise.
	* arm-tdep.c (arm_scan_prologue, thumb_get_next_pc)
	(arm_get_next_pc): Likewise.
	* armnbsd-nat.c (arm_supply_gregset, fetch_register, store_register)
	(store_regs): Likewise.
	* arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
	* arm-linux-nat.c (fetch_register, fetch_regs): Likewise.
	* gdbarch.c, gdbarch.h: Regenerate.
2007-06-09 13:49:20 +00:00
Ulrich Weigand e6cf791626 2007-06-06 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (HAVE_NONSTEPPABLE_WATCHPOINT): Replace by
	gdbarch_have_nonsteppable_watchpoint.
	* infrun.c (handle_inferior_event, adjust_pc_after_break): Likewise.
	* gdbarch.sh (CANNOT_STEP_BREAKPOINT): Replace by
	gdbarch_cannot_step_breakpoint.
	* infrun.c (resume): Likewise.
	* gdbarch.c, gdbarch.h: Regenerate.
2007-06-06 15:38:56 +00:00
Ulrich Weigand 91104499cb * gdbarch.sh (GET_LONGJMP_TARGET): Replace by gdbarch_get_longjmp_target.
* infrun.c (handle_inferior_event): Likewise.
	* gdbarch.sh (GET_LONGJMP_TARGET_P): Replace by
	gdbarch_get_longjmp_target_p.
	* breakpoint.c (breakpoint_re_set): Likewise.
	* infrun.c (handle_inferior_event): Likewise.
	* gdbarch.c, gdbarch.h: Regenerate.
2007-06-06 15:15:34 +00:00
Daniel Jacobowitz ab14ee8d0c * breakpoint.h (enum bpstat_what_main_action): Remove
BPSTAT_WHAT_THROUGH_SIGTRAMP.
	* infrun.c (process_event_stop_test): Do not check for it.
2007-05-23 11:39:17 +00:00
Ulrich Weigand 6d350bb576 * gdbarch.sh: Add skip_permanent_breakpoint callback.
* gdbarch.h, gdbarch.c: Regenerate.

	* infrun.c (SKIP_PERMANENT_BREAKPOINT): Remove default definition.
	(resume): Call gdbarch_skip_permanent_breakpoint instead of
	SKIP_PERMANENT_BREAKPOINT.  Inline default case.

	* hppa-hpux-tdep.c (hppa_skip_permanent_breakpoint): Make static.
	Add REGCACHE argument.  Use it instead of read/write_register.
	(hppa_hpux_init_abi): Install hppa_skip_permanent_breakpoint.

	* config/pa/tm-hppah.h: Delete file.
	* config/pa/hppa64.mt (DEPRECATED_TM_FILE): Set to tm-hppa.h.
	* config/pa/hppahpux.mt (DEPRECATED_TM_FILE): Likewise.
2007-05-07 18:20:21 +00:00
Ulrich Weigand e0cd558aaa * gdbarch.sh (software_single_step): Remove "insert_breakpoints_p" and
"sig" arguments, add "regcache" argument.
	* gdbarch.c, gdbarch.h: Regenerate.

	* infrun.c (resume): Update SOFTWARE_SINGLE_STEP call arguments.
	(handle_inferior_event): Call remove_single_step_breakpoints directly
	instead of calling SOFTWARE_SINGLE_STEP to remove breakpoints.

	* alpha-tdep.c (alpha_software_single_step): Update argument list.
	Remove handling of !insert_breakpoints_p case.
	* arm-tdep.c (arm_software_single_step): Likewise.
	* cris-tdep.c (cris_software_single_step): Likewise.
	* mips-tdep.c (mips_software_single_step): Likewise.
	* rs6000-tdep.c (rs6000_software_single_step): Likewise.
	* sparc-tdep.c (sparc_software_single_step): Likewise.
	* spu-tdep.c (spu_software_single_step): Likewise.

	* alpha-tdep.h (alpha_software_single_step): Update prototype.
	* mips-tdep.h (mips_software_single_step): Likewise.
	* rs6000-tdep.h (rs6000_software_single_step): Likewise.
	* sparc-tdep.h (sparc_software_single_step): Likewise.
2007-04-14 18:10:54 +00:00
Daniel Jacobowitz d3169d93f7 * infrun.c: Doc fixes.
(handle_inferior_event): Clarify debug message.
	(insert_step_resume_breakpoint_at_sal): Print a debug message.
2007-04-13 13:29:42 +00:00
Ulrich Weigand e6590a1b7e 2007-04-12 Luis Machado <luisgpm@br.ibm.com>
* gdbarch.sh (software_single_step): Change the return type
	from void to int and reformatted some comments to <= 80
	columns.
	* gdbarch.c, gdbarch.h: Regenerated.
	* alpha-tdep.c (alpha_software_single_step): Likewise.
	* alpha-tdep.h (alpha_software_single_step): Likewise.
	* arm-tdep.c (arm_software_single_step): Likewise.
	* cris-tdep.c (cris_software_single_step): Likewise.
	* mips-tdep.c (mips_software_single_step): Likewise.
	* mips-tdep.h (mips_software_single_step): Likewise.
	* rs6000-tdep.c (rs6000_software_single_step): Likewise.
	* rs6000-tdep.h (rs6000_software_single_step): Likewise.
	* sparc-tdep.c (sparc_software_single_step): Likewise.
	* sparc-tdep.h (sparc_software_single_step): Likewise.
	* spu-tdep.c (spu_software_single_step): Likewise.
	* infrun.c (resume): Check the return value from SOFTWARE_SINGLE_STEP
	and act accordingly.
2007-04-12 14:52:20 +00:00
Denis Pilat aaf9e9fd5b 2007-03-29 Denis Pilat <denis.pilat@st.com>
* stack.c (print_stack_frame): Always use LOC_AND_ADDRESS in MI output.
	* infrun.c (normal_stop): Remove MI specific frame printing treatment.
2007-03-29 07:35:39 +00:00
Ulrich Weigand 74174d2e39 * arch-utils.c (legacy_pc_in_sigtramp): Remove.
* arch-utils.h (legacy_pc_in_sigtramp): Remove.

	* config/ia64/linux.mt (DEPRECATED_TM_FILE): Remove.
	* config/ia64/tm-linux.h: Remove file.
	* ia64-tdep.h (struct gdbarch_tdep): Add pc_in_sigtramp callback.
	* ia64-tdep.c (ia64_sigtramp_frame_sniffer): Use it instead of
	legacy_pc_in_sigtramp.
	(ia64_gdbarch_init): Initialize tdep->pc_in_sigtramp.
	* ia64-linux-tdep.c (ia64_linux_pc_in_sigtramp): Make static.
	Remove func_name argument.
	(ia64_linux_init_abi): Install it as tdep->pc_in_sigtramp.

	* infrun.c (HAVE_STEPPABLE_WATCHPOINT): Do not redefine.
	* target.c (update_current_target): Add to_have_steppable_watchpoint.
	* target.h (struct target_ops):  Add to_have_steppable_watchpoint.
	(HAVE_STEPPABLE_WATCHPOINT): Define.

	* config/ia64/linux.mh (NATDEPFILES): Remove core-aout.o.
	* config/ia64/nm-linux.h (KERNEL_U_ADDR, U_REGS_OFFSET,
	CANNOT_FETCH_REGISTER, CANNOT_STORE_REGISTER,
	TARGET_CAN_USE_HARDWARE_WATCHPOINT, HAVE_STEPPABLE_WATCHPOINT,
	STOPPED_BY_WATCHPOINT, target_stopped_data_address,
	target_insert_watchpoint, target_remove_watchpoint): Remove.
	(FETCH_INFERIOR_REGISTERS): Define.
	* ia64-linux-nat.c (ia64_register_addr): Make static.
	(ia64_cannot_fetch_register, ia64_cannot_store_register): Likewise.
	(ia64_linux_insert_watchpoint): Make static.  Remove ptid_p argument.
	(ia64_linux_remove_watchpoint): Likewise.  Add type argument.
	(ia64_linux_stopped_data_address): Make static.  Add target_ops.
	(ia64_linux_stopped_by_watchpoint): Make static.
	(ia64_linux_can_use_hw_breakpoint): New function.
	(ia64_linux_fetch_register, ia64_linux_fetch_registers): Likewise.
	(ia64_linux_store_register, ia64_linux_store_registers): Likewise.
	(_initialize_ia64_linux_nat): Install register and watchpoint ops.
2007-03-28 18:56:07 +00:00
Ulrich Weigand 569631c6f2 * infrun.c (breakpoints_failed): Remove unnecessary variable.
(handle_inferior_event): Remove unnecessary braces.
	* breakpoint.c (bpstat_what): Remove wrong comment.
2007-03-09 16:20:42 +00:00
Daniel Jacobowitz 35f196d907 * frame.c (frame_pop, frame_observer_target_changed): Call
reinit_frame_cache.
	(flush_cached_frames): Rename to reinit_frame_cache and delete
	old implementation.
	* frame.h (flush_cached_frames): Delete prototype and update comment.

	* bsd-kvm.c (bsd_kvm_open, bsd_kvm_proc_cmd, bsd_kvm_pcb_cmd): Call
	reinit_frame_cache instead of flush_cached_frames.  Do not call
	select_frame after reinit_frame_cache.
	* corelow.c (core_open): Likewise.
	* gdbarch.sh (deprecated_current_gdbarch_select_hack): Likewise.
	* infrun.c (prepare_to_proceed, context_switch)
	(handle_inferior_event): Likewise.
	* linux-fork.c (fork_load_infrun_state): Likewise.
	* ocd.c (ocd_start_remote): Likewise.
	* remote-e7000.c (e7000_start_remote): Likewise.
	* remote-mips.c (device): Likewise.
	* thread.c (switch_to_thread): Likewise.
	* tracepoint.c (finish_tfind_command): Likewise.
	* gdbarch.c: Regenerated.
2007-02-28 17:35:01 +00:00
Daniel Jacobowitz 206415a3ea * frame.c (deprecated_selected_frame): Rename to...
(selected_frame): ...this.  Make static.
	(get_selected_frame, select_frame): Update.
	* frame.h (deprected_select_frame): Delete.
	(deprecated_safe_get_selected_frame): Update comments.

	* breakpoint.c, cli/cli-cmds.c, f-valprint.c, infcmd.c, inflow.c,
	infrun.c, stack.c, tui/tui-disasm.c, tui/tui-source.c,
	tui/tui-winsource.c, valops.c, varobj.c, findvar.c, macroscope.c,
	parse.c, regcache.h, sh64-tdep.c, tui/tui-hooks.c, tui/tui-win.c,
	tui/tui.c: Replace references to deprecated_selected_frame.
2007-02-27 19:46:04 +00:00
Ulrich Weigand 115d86cfaa * infrun.c (inferior_stop_reason, print_stop_reason): Remove
BREAKPOINT_HIT and STOP_UNKNOWN.
2007-02-22 15:14:12 +00:00
Daniel Jacobowitz fd48f1175c * infrun.c (singlestep_pc): New variable.
(resume): Set singlestep_pc.
	(context_switch): Add a debugging message.  Flush the frame cache.
	(handle_inferior_event): Add debugging messages.  Handle thread
	hops when a software single step has completed.  Let context_switch
	handle flushing the frame cache.
2007-01-10 20:10:23 +00:00
Daniel Jacobowitz 6aba47ca06 Copyright updates for 2007. 2007-01-09 17:59:20 +00:00
Daniel Jacobowitz 17e245fee0 * infrun.c (handle_inferior_event): Don't call
ENSURE_VFORKING_PARENT_REMAINS_STOPPED.
	* target.h (ENSURE_VFORKING_PARENT_REMAINS_STOPPED): Delete.
	(RESUME_EXECD_VFORKING_CHILD_TO_GET_PARENT_VFORK): Delete.
2006-12-30 15:56:00 +00:00
Daniel Jacobowitz 8621d6a944 * inferior.h (start_remote): Update prototype.
* infrun.c (start_remote): Take FROM_TTY.  Call
	post_create_inferior.
	* monitor.c (monitor_open): Update call to start_remote.
	* remote-sds.c (sds_start_remote, sds_open): Likewise.
	* remote.c (remote_start_remote): Likewise.
	(remote_start_remote_dummy): Removed.
	(remote_open): Update call to remote_start_remote.  Do not call
	post_create_inferior here.
2006-10-18 16:56:13 +00:00
Daniel Jacobowitz 5a2901d9ed PR threads/2149
* infrun.c (handle_inferior_event): Context switch after fork
	and exec events.
2006-09-10 16:21:03 +00:00
Daniel Jacobowitz c17eaafea7 * infrun.c (handle_inferior_event): Check the current frame ID
before unwinding to the previous frame.
2006-08-19 03:19:00 +00:00
Mark Kettenis fc5261f2f3 * infrun.c (handle_inferior_event): Typo. 2006-07-22 14:48:03 +00:00
Daniel Jacobowitz 8802d8ed3a * infrun.c (handle_inferior_event): Fixed typos in printf. 2006-07-12 20:43:52 +00:00
Daniel Jacobowitz 14e60db5bc * infrun.c (insert_step_resume_breakpoint_at_caller): New function,
based on insert_step_resume_breakpoint_at_frame.
	(handle_inferior_event): Update comments.  Use
	insert_step_resume_breakpoint_at_caller.
	(insert_step_resume_breakpoint_at_frame): Revise comments.
2006-06-16 01:12:58 +00:00
Daniel Jacobowitz 7abfe01489 * frame.h (set_current_sal_from_frame): New prototype.
* stack.c (set_current_sal_from_frame): Make global.
	* infrun.c (normal_stop): Call set_current_sal_from_frame.
2006-03-30 16:37:13 +00:00
Michael Snyder ac264b3b9c 2006-01-04 Michael Snyder <msnyder@redhat.com>
Checkpoint/Restart for Linux.
	* linux-nat.c: Add support for debugging multiple forks.
	Add #include for linux-fork.h (interface spec).
	(super_mourn_inferior): New function pointer.
	(child_mourn_inferior): New function / target method.
	(linux_target): Claim to_mourn_inferior method pointer.
	(child_follow_fork): Call interface to linux-fork, conditionally
	add new fork processes to list of debugged processes.
	(kill_inferior): Use interface to linux-fork to kill
	multiple processes.

	* linux-fork.h: New file.
	* linux-fork.c: New file.  Support for debugging multiple forks
	of the same program.  Support for checkpoint and restart commands.

	* infrun.c (nullify_last_target_wait_ptid): New function.

	* Makefile.in: Add linux-fork.
	* config/*/linux.mh: Add linux-fork.
	* NEWS: Mention new functionality.
2006-01-04 19:34:58 +00:00
Eli Zaretskii 197e01b6dc * breakpoint.c:
* arm-tdep.c:
	* ia64-tdep.c:
	* i386-tdep.c:
	* hpread.c:
	* hppa-tdep.c:
	* hppa-hpux-tdep.c:
	* gnu-nat.c:
	* gdbtypes.c:
	* gdbarch.h:
	* gdbarch.c:
	* eval.c:
	* dwarf2read.c:
	* dbxread.c:
	* copying:
	* symfile.c:
	* stabsread.c:
	* sh64-tdep.c:
	* sh-tdep.c:
	* s390-tdep.c:
	* rs6000-tdep.c:
	* remote.c:
	* remote-mips.c:
	* mips-tdep.c:
	* mdebugread.c:
	* linux-nat.c:
	* infrun.c:
	* xcoffread.c:
	* win32-nat.c:
	* valops.c:
	* utils.c:
	* tracepoint.c:
	* target.c:
	* symtab.c:
	* c-exp.y:
	* ada-valprint.c:
	* ada-typeprint.c:
	* ada-lex.l:
	* ada-lang.h:
	* ada-lang.c:
	* ada-exp.y:
	* alphafbsd-tdep.c:
	* alphabsd-tdep.h:
	* alphabsd-tdep.c:
	* alphabsd-nat.c:
	* alpha-tdep.h:
	* alpha-tdep.c:
	* alpha-osf1-tdep.c:
	* alpha-nat.c:
	* alpha-mdebug-tdep.c:
	* alpha-linux-tdep.c:
	* alpha-linux-nat.c:
	* aix-thread.c:
	* abug-rom.c:
	* arch-utils.c:
	* annotate.h:
	* annotate.c:
	* amd64obsd-tdep.c:
	* amd64obsd-nat.c:
	* amd64nbsd-tdep.c:
	* amd64nbsd-nat.c:
	* amd64fbsd-tdep.c:
	* amd64fbsd-nat.c:
	* amd64bsd-nat.c:
	* amd64-tdep.h:
	* amd64-tdep.c:
	* amd64-sol2-tdep.c:
	* amd64-nat.h:
	* amd64-nat.c:
	* amd64-linux-tdep.c:
	* amd64-linux-nat.c:
	* alphanbsd-tdep.c:
	* block.h:
	* block.c:
	* bfd-target.h:
	* bfd-target.c:
	* bcache.h:
	* bcache.c:
	* ax.h:
	* ax-general.c:
	* ax-gdb.h:
	* ax-gdb.c:
	* avr-tdep.c:
	* auxv.h:
	* auxv.c:
	* armnbsd-tdep.c:
	* armnbsd-nat.c:
	* arm-tdep.h:
	* arm-linux-nat.c:
	* arch-utils.h:
	* charset.c:
	* call-cmds.h:
	* c-valprint.c:
	* c-typeprint.c:
	* c-lang.h:
	* c-lang.c:
	* buildsym.h:
	* buildsym.c:
	* bsd-uthread.h:
	* bsd-uthread.c:
	* bsd-kvm.h:
	* bsd-kvm.c:
	* breakpoint.h:
	* core-regset.c:
	* core-aout.c:
	* completer.h:
	* completer.c:
	* complaints.h:
	* complaints.c:
	* command.h:
	* coffread.c:
	* coff-solib.h:
	* coff-solib.c:
	* coff-pe-read.h:
	* coff-pe-read.c:
	* cli-out.h:
	* cli-out.c:
	* charset.h:
	* dink32-rom.c:
	* dictionary.h:
	* dictionary.c:
	* demangle.c:
	* defs.h:
	* dcache.h:
	* dcache.c:
	* d10v-tdep.c:
	* cpu32bug-rom.c:
	* cp-valprint.c:
	* cp-support.h:
	* cp-support.c:
	* cp-namespace.c:
	* cp-abi.h:
	* cp-abi.c:
	* corelow.c:
	* corefile.c:
	* environ.c:
	* elfread.c:
	* dwarfread.c:
	* dwarf2loc.c:
	* dwarf2expr.h:
	* dwarf2expr.c:
	* dwarf2-frame.h:
	* dwarf2-frame.c:
	* dve3900-rom.c:
	* dummy-frame.h:
	* dummy-frame.c:
	* dsrec.c:
	* doublest.h:
	* doublest.c:
	* disasm.h:
	* disasm.c:
	* fork-child.c:
	* findvar.c:
	* fbsd-nat.h:
	* fbsd-nat.c:
	* f-valprint.c:
	* f-typeprint.c:
	* f-lang.h:
	* f-lang.c:
	* expression.h:
	* expprint.c:
	* exec.h:
	* exec.c:
	* exceptions.h:
	* exceptions.c:
	* event-top.h:
	* event-top.c:
	* event-loop.h:
	* event-loop.c:
	* gdb.c:
	* gdb-stabs.h:
	* gdb-events.h:
	* gdb-events.c:
	* gcore.c:
	* frv-tdep.h:
	* frv-tdep.c:
	* frv-linux-tdep.c:
	* frame.h:
	* frame.c:
	* frame-unwind.h:
	* frame-unwind.c:
	* frame-base.h:
	* frame-base.c:
	* gdb_vfork.h:
	* gdb_thread_db.h:
	* gdb_string.h:
	* gdb_stat.h:
	* gdb_regex.h:
	* gdb_ptrace.h:
	* gdb_proc_service.h:
	* gdb_obstack.h:
	* gdb_locale.h:
	* gdb_dirent.h:
	* gdb_curses.h:
	* gdb_assert.h:
	* gdbarch.sh:
	* gdb.h:
	* hpux-thread.c:
	* hppabsd-nat.c:
	* hppa-tdep.h:
	* hpacc-abi.c:
	* h8300-tdep.c:
	* gregset.h:
	* go32-nat.c:
	* gnu-v3-abi.c:
	* gnu-v2-abi.h:
	* gnu-v2-abi.c:
	* gnu-nat.h:
	* glibc-tdep.c:
	* gdbtypes.h:
	* gdbcore.h:
	* gdbcmd.h:
	* i386nbsd-tdep.c:
	* i386nbsd-nat.c:
	* i386gnu-tdep.c:
	* i386gnu-nat.c:
	* i386fbsd-tdep.c:
	* i386fbsd-nat.c:
	* i386bsd-tdep.c:
	* i386bsd-nat.h:
	* i386bsd-nat.c:
	* i386-tdep.h:
	* i386-sol2-nat.c:
	* i386-nto-tdep.c:
	* i386-nat.c:
	* i386-linux-tdep.h:
	* i386-linux-tdep.c:
	* i386-linux-nat.c:
	* i386-cygwin-tdep.c:
	* inf-ttrace.c:
	* inf-ptrace.h:
	* inf-ptrace.c:
	* inf-loop.h:
	* inf-loop.c:
	* inf-child.h:
	* inf-child.c:
	* ia64-tdep.h:
	* ia64-linux-nat.c:
	* i387-tdep.h:
	* i387-tdep.c:
	* i386v4-nat.c:
	* i386v-nat.c:
	* i386obsd-tdep.c:
	* i386obsd-nat.c:
	* kod.c:
	* jv-valprint.c:
	* jv-typeprint.c:
	* jv-lang.h:
	* jv-lang.c:
	* irix5-nat.c:
	* iq2000-tdep.c:
	* interps.h:
	* interps.c:
	* inftarg.c:
	* inflow.h:
	* inflow.c:
	* inferior.h:
	* infcmd.c:
	* infcall.h:
	* infcall.c:
	* inf-ttrace.h:
	* m32r-tdep.h:
	* m32r-tdep.c:
	* m32r-rom.c:
	* m32r-linux-tdep.c:
	* m32r-linux-nat.c:
	* m2-valprint.c:
	* m2-typeprint.c:
	* m2-lang.h:
	* m2-lang.c:
	* lynx-nat.c:
	* linux-thread-db.c:
	* linux-nat.h:
	* linespec.c:
	* libunwind-frame.h:
	* libunwind-frame.c:
	* language.h:
	* language.c:
	* macroexp.c:
	* macrocmd.c:
	* m88kbsd-nat.c:
	* m88k-tdep.h:
	* m88k-tdep.c:
	* m68klinux-tdep.c:
	* m68klinux-nat.c:
	* m68kbsd-tdep.c:
	* m68kbsd-nat.c:
	* m68k-tdep.h:
	* m68k-tdep.c:
	* mips-linux-nat.c:
	* mips-irix-tdep.c:
	* minsyms.c:
	* memattr.h:
	* memattr.c:
	* mem-break.c:
	* mdebugread.h:
	* main.h:
	* main.c:
	* macrotab.h:
	* macrotab.c:
	* macroscope.h:
	* macroscope.c:
	* macroexp.h:
	* nbsd-tdep.c:
	* mt-tdep.c:
	* monitor.h:
	* monitor.c:
	* mn10300-tdep.h:
	* mn10300-tdep.c:
	* mn10300-linux-tdep.c:
	* mipsv4-nat.c:
	* mipsread.c:
	* mipsnbsd-tdep.h:
	* mipsnbsd-tdep.c:
	* mipsnbsd-nat.c:
	* mips64obsd-tdep.c:
	* mips64obsd-nat.c:
	* mips-tdep.h:
	* mips-mdebug-tdep.c:
	* mips-linux-tdep.c:
	* osabi.h:
	* osabi.c:
	* ocd.h:
	* ocd.c:
	* observer.c:
	* objfiles.h:
	* objfiles.c:
	* objc-lang.h:
	* objc-lang.c:
	* objc-exp.y:
	* nto-tdep.h:
	* nto-tdep.c:
	* nto-procfs.c:
	* nlmread.c:
	* nbsd-tdep.h:
	* ppcobsd-tdep.c:
	* ppcobsd-nat.c:
	* ppcnbsd-tdep.h:
	* ppcnbsd-tdep.c:
	* ppcnbsd-nat.c:
	* ppcbug-rom.c:
	* ppc-tdep.h:
	* ppc-sysv-tdep.c:
	* ppc-linux-tdep.c:
	* ppc-linux-nat.c:
	* ppc-bdm.c:
	* parser-defs.h:
	* parse.c:
	* p-valprint.c:
	* p-typeprint.c:
	* p-lang.h:
	* p-lang.c:
	* remote-fileio.h:
	* remote-fileio.c:
	* remote-est.c:
	* remote-e7000.c:
	* regset.h:
	* regset.c:
	* reggroups.h:
	* reggroups.c:
	* regcache.h:
	* regcache.c:
	* proc-why.c:
	* proc-service.c:
	* proc-events.c:
	* printcmd.c:
	* ppcobsd-tdep.h:
	* sentinel-frame.h:
	* sentinel-frame.c:
	* scm-valprint.c:
	* scm-tags.h:
	* scm-lang.h:
	* scm-lang.c:
	* scm-exp.c:
	* s390-tdep.h:
	* rom68k-rom.c:
	* remote.h:
	* remote-utils.c:
	* remote-st.c:
	* remote-sim.c:
	* remote-sds.c:
	* remote-rdp.c:
	* remote-rdi.c:
	* remote-hms.c:
	* sim-regno.h:
	* shnbsd-tdep.h:
	* shnbsd-tdep.c:
	* shnbsd-nat.c:
	* sh-tdep.h:
	* serial.h:
	* serial.c:
	* ser-unix.h:
	* ser-unix.c:
	* ser-tcp.c:
	* ser-pipe.c:
	* ser-go32.c:
	* ser-e7kpc.c:
	* ser-base.h:
	* ser-base.c:
	* solib.c:
	* solib-svr4.h:
	* solib-svr4.c:
	* solib-sunos.c:
	* solib-som.h:
	* solib-som.c:
	* solib-pa64.h:
	* solib-pa64.c:
	* solib-osf.c:
	* solib-null.c:
	* solib-legacy.c:
	* solib-irix.c:
	* solib-frv.c:
	* solib-aix5.c:
	* sol-thread.c:
	* sparc64-linux-tdep.c:
	* sparc64-linux-nat.c:
	* sparc-tdep.h:
	* sparc-tdep.c:
	* sparc-sol2-tdep.c:
	* sparc-sol2-nat.c:
	* sparc-nat.h:
	* sparc-nat.c:
	* sparc-linux-tdep.c:
	* sparc-linux-nat.c:
	* source.h:
	* source.c:
	* somread.c:
	* solist.h:
	* solib.h:
	* std-regs.c:
	* stack.h:
	* stack.c:
	* stabsread.h:
	* sparcobsd-tdep.c:
	* sparcnbsd-tdep.c:
	* sparcnbsd-nat.c:
	* sparc64obsd-tdep.c:
	* sparc64nbsd-tdep.c:
	* sparc64nbsd-nat.c:
	* sparc64fbsd-tdep.c:
	* sparc64fbsd-nat.c:
	* sparc64-tdep.h:
	* sparc64-tdep.c:
	* sparc64-sol2-tdep.c:
	* sparc64-nat.c:
	* ui-file.c:
	* typeprint.h:
	* typeprint.c:
	* tramp-frame.h:
	* tramp-frame.c:
	* trad-frame.h:
	* trad-frame.c:
	* tracepoint.h:
	* top.c:
	* tobs.inc:
	* thread.c:
	* terminal.h:
	* target.h:
	* symfile.h:
	* stop-gdb.c:
	* vaxbsd-nat.c:
	* vax-tdep.h:
	* vax-tdep.c:
	* vax-nat.c:
	* varobj.h:
	* varobj.c:
	* value.h:
	* value.c:
	* valprint.h:
	* valprint.c:
	* v850-tdep.c:
	* uw-thread.c:
	* user-regs.c:
	* ui-out.h:
	* ui-out.c:
	* ui-file.h:
	* xcoffsolib.h:
	* xcoffsolib.c:
	* wrapper.c:
	* wince.c:
	* wince-stub.h:
	* wince-stub.c:
	* vaxobsd-tdep.c:
	* vaxnbsd-tdep.c:
	* gdb_gcore.sh:
	* copying.c:
	* configure.ac:
	* aclocal.m4:
	* acinclude.m4:
	* reply_mig_hack.awk:
	* observer.sh:
	* gdb_mbuild.sh:
	* arm-linux-tdep.c:
	* blockframe.c:
	* dbug-rom.c:
	* environ.h:
	* dwarf2loc.h:
	* gdb-events.sh:
	* glibc-tdep.h:
	* gdb_wait.h:
	* gdbthread.h:
	* i386-sol2-tdep.c:
	* hppabsd-tdep.c:
	* hppa-linux-nat.c:
	* hppa-hpux-nat.c:
	* ia64-linux-tdep.c:
	* infptrace.c:
	* linespec.h:
	* maint.c:
	* mips-mdebug-tdep.h:
	* remote-m32r-sdi.c:
	* s390-nat.c:
	* rs6000-nat.c:
	* remote-utils.h:
	* sh3-rom.c:
	* sh-linux-tdep.c:
	* top.h:
	* symtab.h:
	* symmisc.c:
	* symfile-mem.c:
	* srec.h:
	* user-regs.h:
	* version.h:
	* valarith.c:
	* xstormy16-tdep.c:
	* wrapper.h:
	* Makefile.in:
	* f-exp.y:
	* cris-tdep.c:
	* cp-name-parser.y:
	* procfs.c:
	* proc-utils.h:
	* proc-flags.c:
	* proc-api.c:
	* p-exp.y:
	* m68hc11-tdep.c:
	* m2-exp.y:
	* kod.h:
	* kod-cisco.c:
	* jv-exp.y:
	* hppa-linux-tdep.c: Add (c) after Copyright.  Update the FSF
	address.
2005-12-17 22:34:03 +00:00
Andrew Stubbs f17517ea06 2005-11-07 Andrew Stubbs <andrew.stubbs@st.com>
* main.h (return_child_result, return_child_result_value): Declare.
	* infrun.c: Include main.h.
	(print_stop_reason): Remove declaration of return_child_result_value.
	* top.c: Include main.h.
	(quit_force): Remove declarations of return_child_result_value and
	return_child_result.
	* Makefile.in (top.o, infrun.o): Add main.h to dependencies.
2005-11-07 15:27:07 +00:00
Andrew Stubbs 4b0ad76243 2005-11-04 Andrew Stubbs <andrew.stubbs@st.com>
* infrun.c (print_stop_reason): Set return_child_result_value on exit.
	* main.c (return_child_result): New variable.
	(return_child_result_value): Likewise.
	(captured_main): Add option --return-child-result.
	Replace call to target_detach and exit (in batch mode) with quit_force.
	(print_gdb_help): Add option --return-child-result.
	* top.c (quit_force): Return child result if appropriate.

docs/
	* gdb.texinfo (Choosing modes): Add --return-child-result.
2005-11-04 11:49:12 +00:00
Andreas Schwab 9022543867 PR threads/2015
* infrun.c (adjust_pc_after_break): Don't use the state from a
	non-matching thread context.
2005-09-29 20:41:27 +00:00
Daniel Jacobowitz 6ad80df050 * infrun.c (init_execution_control_state): Initialize
ecs->another_trap.
2005-09-28 16:17:06 +00:00
Daniel Jacobowitz 7ed0fe6656 Suggested by Vladimir Prus <ghost@cs.msu.su>:
* infrun.c (handle_inferior_event): Check for line information in
	undebuggable functions.
2005-08-01 03:32:32 +00:00
Bob Rossi 034dad6fa1 This is a cleanup change. It is the beggining of allowing GDB/MI to be
better understood (internally).
2005-05-29 03:13:19 +00:00
Mark Kettenis a77053c217 * solib.h (CLEAR_SOLIB, SOLIB_ADD)
(SOLIB_CREATE_INFERIOR_HOOK, SOLIB_REMOVE_INFERIOR_HOOK)
(SOLIB_IN_DYNAMIC_LINKER, SOLIB_RESTART)
(DISABLE_UNSETTABLE_BREAK, PC_SOLIB)
(IN_SOLIB_DYNSYM_RESOLVE_CODE): Remove defines and orphaned
comments.
* breakpoint.c: Include "solib.h".
(insert_bp_location) [!DISABLE_UNSETTABLE_BREAK]: Call
solib_address.
(remove_solib_event_breakpoints, create_solib_event_breakpoint)
(disable_breakpoints_in_shlibs)
(disable_breakpoints_in_unloaded_shlib)
(re_enable_breakpoints_in_shlibs): Compile if SOLIB_ADD isn't
defined. If PC_SOLIB isn't defined, call solib_address.
(_initialize_breakpoint): Unconditionally install observer.
* corelow.c: Include "solib.h".
[SOLIB_ADD] (solib_add_stub): Remove prototype.
(core_close) [!CLEAR_SOLIB]: Call clear_solib.
(solib_add_stub) [!SOLIB_ADD] Call solib_add.
(core_open): Unconditionally call solib_add_stub.
* fork-child.c: Include "solib.h".
(fork_inferior) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
* infcmd.c: Include "solib.h".
(attach_command) [!SOLIB_ADD]: Call shlib_rescan.  Unconditionally
call re_enable_breakpoints_in_shlibs.
* infrun.c: Include "solib.h".
(SOLIB_IN_SYNSYM_RESOLVE_CODE): Don't define if not already
defined.
(stop_on_solib_events, show_stop_on_solib_events): Include
unconditionally.
(follow_exec) [!SOLIB_CREATE_INFERIOR_HOOK]: Call
solib_create_inferior_hook.
(handle_inferior_event) [!SOLIB_ADD]: Call shlib_add.
[!IN_SOLIB_DYNSYM_RESOLVE_CODE]: Call in_solib_dynsym_resolve_code.
(_initialize_infrun): Unconditionally add "stop_on_solib-events"
command.
* remote.c: Include "solib.h".
(remote_open_1): Unconditionally call no_shared_libraries.
[!SOLIB_CREATE_INFERIOR_HOOK] Call solib_create_inferior_hook.
* stack.c: Include "solib.h".
(print_frame) [!PC_SOLIB] Call shlib_for_pc.
* xcoffsolib.c (no_shared_libraries): Remove function.
* Makefile.in (SFILES): Add solib.c.
(ALLDEPFILES): Remove solib.c.
(COMMON_OBS): Add solib.o.
(breakpoint.o, corelow.o, fork-chiled.o, infcmd.o, infrun.o)
(remote.o, stack.o): Update dependencies.
2005-05-12 20:21:18 +00:00
Ben Elliston 8bbde30215 * infrun.c (handle_inferior_event): Update the comment about users
of stepped_after_stopped_by_watchpoint.
2005-05-02 23:56:36 +00:00
Andrew Cagney 920d2a4419 2005-02-24 Andrew Cagney <cagney@gnu.org>
Add show_VARIABLE functions, update add_setshow call.
	* varobj.c (_initialize_varobj, show_varobjdebug): Add and update.
	* valprint.c (_initialize_valprint, show_print_max)
	(show_stop_print_at_null, show_repeat_count_threshold)
	(show_prettyprint_structs, show_unionprint)
	(show_prettyprint_arrays, show_addressprint, show_input_radix)
	(show_output_radix): Ditto.
	* valops.c (_initialize_valops, show_overload_resolution): Ditto.
	* utils.c (initialize_utils, show_chars_per_line)
	(show_lines_per_page, show_demangle, show_pagination_enabled)
	(show_sevenbit_strings, show_asm_demangle): Ditto
	* tui/tui-win.c (_initialize_tui_win, show_tui_border_kind)
	(show_tui_border_mode, show_tui_active_border_mode): Ditto.
	* top.c (init_main, show_new_async_prompt)
	(show_async_command_editing_p, show_write_history_p)
	(show_history_size, show_history_filename, show_caution)
	(show_annotation_level, init_main): Ditto.
	* target.c (initialize_targets, show_targetdebug)
	(show_trust_readonly): Ditto.
	* symfile.c (_initialize_symfile, show_symbol_reloading)
	(show_ext_args, show_download_write_size)
	(show_debug_file_directory): Ditto.
	* source.c (_initialize_source, show_lines_to_list): Ditto.
	* solib.c (_initialize_solib, show_auto_solib_add)
	(show_solib_search_path): Ditto.
	* p-valprint.c (_initialize_pascal_valprint)
	(show_pascal_static_field_print): Ditto.
	* printcmd.c (_initialize_printcmd, show_max_symbolic_offset)
	(show_print_symbol_filename): Add and update.
	* parse.c (_initialize_parse, show_expressiondebug): Dito.
	* observer.c (_initialize_observer, show_observer_debug): Dito.
	* maint.c (_initialize_maint_cmds, show_watchdog)
	(show_maintenance_profile_p): Dito.
	* linux-nat.c (_initialize_linux_nat, show_debug_linux_nat): Dito.
	* infrun.c (_initialize_infrun, show_debug_infrun)
	(show_stop_on_solib_events, show_follow_fork_mode_string)
	(show_scheduler_mode, show_step_stop_if_no_debug): Ditto.
	* infcall.c (_initialize_infcall, show_coerce_float_to_double_p)
	(show_unwind_on_signal_p): Ditto.
	* gdbtypes.c (build_gdbtypes, show_opaque_type_resolution)
	(_initialize_gdbtypes, show_overload_debug): Ditto.
	* gdb-events.c, gdb-events.sh (_initialize_gdb_events)
	(show_gdb_events_debug): Ditto.
	* gdbarch.c, gdbarch.sh (show_gdbarch_debug)
	(_initialize_gdbarch): Ditto.
	* frame.c (_initialize_frame, show_backtrace_past_main)
	(show_backtrace_past_entry, show_backtrace_limit)
	(show_frame_debug): Ditto.
	* exec.c (_initialize_exec, show_write_files): Ditto.
	* dwarf2read.c (_initialize_dwarf2_read)
	(show_dwarf2_max_cache_age): Ditto.
	* demangle.c (_initialize_demangler)
	(show_demangling_style_names): Ditto.
	* dcache.c (_initialize_dcache, show_dcache_enabled_p): Ditto.
	* cp-valprint.c (show_static_field_print)
	(_initialize_cp_valprint, show_vtblprint, show_objectprint): Ditto.
	* corefile.c (_initialize_core, show_gnutarget_string): Ditto.
	* cli/cli-logging.c (_initialize_cli_logging)
	(show_logging_overwrite, show_logging_redirect)
	(show_logging_filename): Ditto.
	* cli/cli-cmds.c (show_info_verbose, show_history_expansion_p)
	(init_cli_cmds, show_baud_rate, show_remote_debug)
	(show_remote_timeout, show_max_user_call_depth): Ditto.
	* charset.c (show_host_charset_name, show_target_charset_name)
	(initialize_charset): Ditto.
	* breakpoint.c (show_can_use_hw_watchpoints)
	(show_pending_break_support, _initialize_breakpoint): Ditto.
2005-02-24 13:51:36 +00:00
Andrew Cagney eefe576e60 2005-02-21 Andrew Cagney <cagney@gnu.org>
* cli/cli-decode.c (add_set_enum_cmd): Delete function.
	(deprecated_add_show_from_set): Delete function.
	* command.h (add_set_enum_cmd): Delete declaration.
	(deprecated_add_show_from_set): Delete declaration.
	* cli/cli-decode.h (add_set_enum_cmd): Delete declaration.
	(deprecated_add_show_from_set): Delete declaration.
	* arm-tdep.c (_initialize_arm_tdep): Update comment.
	* kod.c (kod_set_os): Simplify.
	* infrun.c (set_schedlock_func): Simplify.
	* cli/cli-dump.c (add_dump_command): Update comment.
2005-02-21 07:15:49 +00:00
Andrew Cagney 7ab044018a 2005-02-20 Andrew Cagney <cagney@gnu.org>
Use add_setshow_enum_cmd through out.
	* arch-utils.c, charset.c, demangle.c, i386-tdep.c: Update.
	* infrun.c, mips-tdep.c, osabi.c, serial.c, tui/tui-win.c: Update.
2005-02-21 04:31:59 +00:00
Andrew Cagney 85c078043b 2005-02-18 Andrew Cagney <cagney@gnu.org>
Use add_setshow_zinteger_cmd through out.  Re-sync gdbarch.sh
	and gdbarch.c.
	* breakpoint.c, frame.c, gdb-events.sh, gdbarch.sh: Update.
	* gdbtypes.c, infrun.c, linux-nat.c, maint.c, monitor.c: Update.
	* pa64solib.c, parse.c, remote-mips.c, ser-go32.c: Update.
	* serial.c, solib-frv.c, somsolib.c, target.c, top.c: Update.
	* varobj.c, cli/cli-cmds.c: Update.
	* gdbarch.c, gdb-events.c: Regenerate.
2005-02-18 18:58:56 +00:00
Andrew Cagney 5bf193a2ee 2005-02-18 Andrew Cagney <cagney@gnu.org>
Use add_setshow_boolean_command through out.  Delete #ifdef 0'ed
	code adding set/show boolean commands.
	* cp-valprint.c, dcache.c, exec.c, gdbtypes.c, infrun.c: Update.
	* monitor.c, p-valprint.c, pa64solib.c, printcmd.c: Update.
	* proc-api.c, remote-mips.c, remote.c, solib.c: Update.
	* somsolib.c, symfile.c, top.c, utils.c, valops.c: Update.
	* valprint.c, win32-nat.c, wince.c, xcoffsolib.c: Update.
	* cli/cli-cmds.c: Update.
2005-02-18 15:25:32 +00:00
Andrew Cagney 1bedd21517 2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
	* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
	* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
	* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
	* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
	* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
	* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
	* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
	* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
	* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
	* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
	* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
	* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
	* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
	* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
	* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 15:49:28 +00:00
Andrew Cagney 1a966eabdf 2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_cmd.
	* arch-utils.c, avr-tdep.c, breakpoint.c, corefile.c: Update.
	* cp-abi.c, cp-namespace.c, cp-support.c, dummy-frame.c: Update.
	* exec.c, gnu-nat.c, go32-nat.c, hppa-tdep.c, infcmd.c: Update.
	* infrun.c, interps.c, macrocmd.c, maint.c, memattr.c: Update.
	* mips-tdep.c, ocd.c, osabi.c, printcmd.c, regcache.c: Update.
	* reggroups.c, remote-fileio.c, remote-rdi.c, remote.c: Update.
	* sol-thread.c, source.c, stack.c, symfile-mem.c: Update.
	* symfile.c, thread.c, tracepoint.c, valprint.c, value.c: Update.
	* win32-nat.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
	* cli/cli-logging.c, tui/tui-regs.c: Update.
2005-02-14 18:10:11 +00:00
Andrew Cagney a3f171870f 2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
	* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
	* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
	* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
	* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
	* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
	* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
	* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
	* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
	* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
	* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
	* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
	* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
	* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
	* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 00:39:24 +00:00
Andrew Cagney e2e0b3e57f 2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
	internal_error.
	* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
	* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
	* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
	* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
	* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
	* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
	* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
	* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
	* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
	* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
	* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
	* interps.c, language.c, linespec.c, linux-nat.c: Update.
	* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
	* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
	* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
	* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
	* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
	* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
	* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
	* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
	* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
	* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
	* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
	* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
	* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
	* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
	* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
	* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
	* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
	* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
	* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
	* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
	* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
	* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 18:13:55 +00:00
Andrew Cagney 8a3fe4f86c 2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
	* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
	* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
	* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
	* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
	* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
	* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
	* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
	* event-top.c, exec.c, expprint.c, f-lang.c: Update.
	* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
	* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
	* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
	* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
	* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
	* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
	* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
	* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
	* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
	* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
	* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
	* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
	* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
	* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
	* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
	* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
	* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
	* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
	* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
	* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
	* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
	* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
	* remote-rdp.c, remote-sim.c, remote-st.c: Update.
	* remote-utils.c, remote-utils.h, remote.c: Update.
	* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
	* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
	* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
	* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
	* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
	* somread.c, somsolib.c, source.c, stabsread.c: Update.
	* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
	* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
	* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
	* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
	* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
	* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
	* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
	* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
	* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
	* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
	* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
	* tui/tui-win.c: Update.
2005-02-11 04:06:14 +00:00
Andrew Cagney 9d799f85e0 Index: ChangeLog
2005-01-24  Andrew Cagney  <cagney@gnu.org>

	* infrun.c (handle_inferior_event): Handle back-to-back and nested
	signals where the step_resume_breakpoint may have already been
	inserted.

Index: testsuite/ChangeLog
2005-01-24  Andrew Cagney  <cagney@gnu.org>

	* gdb.base/sigrepeat.exp, gdb.base/sigrepeat.c: New test.
2005-01-24 22:00:59 +00:00
Andrew Cagney 8a9de0e488 2005-01-19 Andrew Cagney <cagney@gnu.org>
* infrun.c: (resume, proceed, wait_for_inferior)
	(handle_inferior_event, stop_stepping)
	(prepare_to_wait): Write debug output to gdb_stdlog.
2005-01-19 16:09:46 +00:00
Michael Snyder 9d1ff73f7b 2005-01-13 Michael Snyder <msnyder@redhat.com>
* infrun.c: Whitespace tweaks.
2005-01-14 00:51:43 +00:00
Andrew Cagney 60250e8b18 2005-01-12 Andrew Cagney <cagney@gnu.org>
* exceptions.h (enum return_reason, RETURN_MASK)
	(RETURN_MASK_QUIT, RETURN_MASK_ERROR, RETURN_MASK_ALL)
	(return_mask, throw_exception, catch_exceptions_ftype)
	(catch_exceptions_with_msg, catch_errors_ftype, catch_errors)
	(catch_command_errors_ftype, catch_command_errors): Move to
	exceptions.h.
	* exceptions.c, exceptions.h: New files.
	* top.c: Do not include <setjmp.h>.
	(SIGJMP_BUF, SIGSETJMP, SIGLONGJMP, catch_return)
	(throw_exception, catcher, catch_exceptions)
	(catch_exceptions_with_msg, struct catch_errors_args)
	(do_catch_errors, catch_errors, struct captured_command_args)
	(do_captured_command, catch_command_errors): Move to exceptions.c.
	* wrapper.c, wince.c, win32-nat.c, utils.c: Include "exceptions.h".
	* tui/tui-interp.c, top.c, thread.c, symmisc.c: Ditto.
	* symfile-mem.c, stack.c, solib.c, rs6000-nat.c: Ditto.
	* remote-sds.c, remote-mips.c, remote-fileio.c: Ditto.
	* remote-e7000.c, objc-lang.c, ocd.c: Ditto.
	* remote.c, nto-procfs.c, monitor.c, mi/mi-main.c: Ditto.
	* main.c, m32r-rom.c, infrun.c, inf-loop.c: Ditto.
	* hppa-hpux-tdep.c, frame.c, event-top.c, event-loop.c: Ditto.
	* corelow.c, corefile.c, cli/cli-interp.c, breakpoint.c: Ditto.
	* ada-valprint.c, ada-lang.c: Ditto.
	* Makefile.in (HFILES_NO_SRCDIR, COMMON_OBS): Add exceptions.h and
	exceptions.o.  Update all dependencies.
2005-01-12 18:31:35 +00:00
Mark Kettenis b4dc5ffa12 * target.h (TARGET_DISABLE_HW_WATCHPOINTS)
(TARGET_ENABLE_HW_WATCHPOINTS): Remove macros.
* infrun.c (struct execution_control_state): Remove
enable_hw_watchpoints_after_wait member.
(number_of_threads_in_syscalls): Remove variable.
(init_wait_for_inferior): Don't initialize
number_of_threads_in_syscalls.
(init_execution_control_state): Don't initialize
ECS->enable_hw_watchpoints_after_wait.
(handle_inferior_event): Never invoke TARGET_ENABLE_HW_WATCHPOINTS
or TARGET_DISABLE_HW_WATCHPOINTS.
2004-12-24 22:54:02 +00:00
Randolph Chung fe46cd3ab5 2004-12-03 Randolph Chung <tausq@debian.org>
* gdbarch.sh (instruction_nullified): Delete.
	* gdbarch.c: Regenerate.
	* gdbarch.h: Regenerate.
	* hppa-tdep.c (hppa_target_read_pc): Adjust pc if instruction is
	nullified.
	(hppa_unwind_pc): Likewise.
	(hppa_instruction_nullified): Delete.
	(hppa_gdbarch_init): Don't set instruction_nullified method.
	* infrun.c (infwait_states): Remove infwait_nullified_state.
	(handle_inferior_event): Remove handling of infwait_nullified_state.
	Remove handling of nullified instructions.


testsuite/

	* gdb.arch/pa-nullify.exp: New file.
	* gdb.arch/pa-nullify.s: New file.
2004-12-03 23:59:53 +00:00