aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
AgeCommit message (Collapse)AuthorFilesLines
2011-01-092011-01-08 Michael Snyder <msnyder@vmware.com>Michael Snyder1-70/+70
* h8300-tdep.c: Comment cleanup, mostly periods and spaces. * hppa-hpux-tdep.c: Ditto. * hppa-linux-nat.c: Ditto. * hppa-linux-tdep.c: Ditto. * hppanbsd-tdep.c: Ditto. * hppa-tdep.c: Ditto. * hppa-tdep.h: Ditto. * hpux-thread.c: Ditto. * i386-cygwin-tdep.c: Ditto. * i386-darwin-nat.c: Ditto. * i386gnu-nat.c: Ditto. * i386-linux-nat.c: Ditto. * i386-linux-tdep.c: Ditto. * i386-nat.c: Ditto. * i386-nat.h: Ditto. * i386nbsd-tdep.c: Ditto. * i386-sol2-nat.c: Ditto. * i386-stub.c: Ditto. * i386-tdep.c: Ditto. * i386-tdep.h: Ditto. * i387-tdep.c: Ditto. * ia64-linux-nat.c: Ditto. * ia64-linux-tdep.c: Ditto. * ia64-tdep.c: Ditto. * infcall.c: Ditto. * infcall.h: Ditto. * infcmd.c: Ditto. * inferior.c: Ditto. * inferior.h: Ditto. * infloop.c: Ditto. * inflow.c: Ditto. * infrun.c: Ditto. * interps.c: Ditto. * interps.h: Ditto. * iq2000-tdep.c: Ditto. * irix5-nat.c: Ditto. * jit.c: Ditto. * jit.h: Ditto. * jv-exp.y: Ditto. * jv-lang.c: Ditto. * jv-lang.h: Ditto. * jv-typeprint.c: Ditto. * jv-valprint.c: Ditto. * language.c: Ditto. * language.h: Ditto. * linespec.c: Ditto. * linux-fork.c: Ditto. * linux-nat.c: Ditto. * linux-thread-db.c: Ditto. * lm32-tdep.c: Ditto.
2011-01-072011-01-07 Michael Snyder <msnyder@vmware.com>Michael Snyder1-5/+4
* ax-gdb.c: Adjust some long output strings. * breakpoint.c: Ditto. * charset.c: Ditto. * cp-abi.c: Ditto. * infcall.c: Ditto. * infrun.c: Ditto. * linux-nat.c: Ditto. * solib-pa64.c: Ditto. * solib-som.c: Ditto.
2011-01-06Do not stop on SIGPRIO signals by defaultJoel Brobecker1-0/+2
This signal does not indicate an error condition, so the default behavior when receiving this signal should be to resume execution silently. gdb/ChangeLog: Do not stop on SIGPRIO signals by default * infrun.c (_initialize_infrun): Unset signal_stop and signal_print for TARGET_SIGNAL_PRIO.
2011-01-052011-01-05 Michael Snyder <msnyder@vmware.com>Michael Snyder1-70/+102
* addrmap.c: Shorten lines of >= 80 columns. * arch-utils.c: Ditto. * arch-utils.h: Ditto. * ax-gdb.c: Ditto. * ax-general.c: Ditto. * bcache.c: Ditto. * blockframe.c: Ditto. * breakpoint.c: Ditto. * buildsym.c: Ditto. * c-lang.c: Ditto. * c-typeprint.c: Ditto. * charset.c: Ditto. * coffread.c: Ditto. * command.h: Ditto. * corelow.c: Ditto. * cp-abi.c: Ditto. * cp-namespace.c: Ditto. * cp-support.c: Ditto. * dbug-rom.c: Ditto. * dbxread.c: Ditto. * defs.h: Ditto. * dfp.c: Ditto. * dfp.h: Ditto. * dictionary.c: Ditto. * disasm.c: Ditto. * doublest.c: Ditto. * dwarf2-frame.c: Ditto. * dwarf2expr.c: Ditto. * dwarf2loc.c: Ditto. * dwarf2read.c: Ditto. * elfread.c: Ditto. * eval.c: Ditto. * event-loop.c: Ditto. * event-loop.h: Ditto. * exceptions.h: Ditto. * exec.c: Ditto. * expprint.c: Ditto. * expression.h: Ditto. * f-lang.c: Ditto. * f-valprint.c: Ditto. * findcmd.c: Ditto. * frame-base.c: Ditto. * frame-unwind.c: Ditto. * frame-unwind.h: Ditto. * frame.c: Ditto. * frame.h: Ditto. * gcore.c: Ditto. * gdb-stabs.h: Ditto. * gdb_assert.h: Ditto. * gdb_dirent.h: Ditto. * gdb_obstack.h: Ditto. * gdbcore.h: Ditto. * gdbtypes.c: Ditto. * gdbtypes.h: Ditto. * inf-ttrace.c: Ditto. * infcall.c: Ditto. * infcmd.c: Ditto. * inflow.c: Ditto. * infrun.c: Ditto. * inline-frame.h: Ditto. * language.c: Ditto. * language.h: Ditto. * libunwind-frame.c: Ditto. * libunwind-frame.h: Ditto. * linespec.c: Ditto. * linux-nat.c: Ditto. * linux-nat.h: Ditto. * linux-thread-db.c: Ditto. * machoread.c: Ditto. * macroexp.c: Ditto. * macrotab.c: Ditto. * main.c: Ditto. * maint.c: Ditto. * mdebugread.c: Ditto. * memattr.c: Ditto. * minsyms.c: Ditto. * monitor.c: Ditto. * monitor.h: Ditto. * objfiles.c: Ditto. * objfiles.h: Ditto. * osabi.c: Ditto. * p-typeprint.c: Ditto. * p-valprint.c: Ditto. * parse.c: Ditto. * printcmd.c: Ditto. * proc-events.c: Ditto. * procfs.c: Ditto. * progspace.c: Ditto. * progspace.h: Ditto. * psympriv.h: Ditto. * psymtab.c: Ditto. * record.c: Ditto. * regcache.c: Ditto. * regcache.h: Ditto. * remote-fileio.c: Ditto. * remote.c: Ditto. * ser-mingw.c: Ditto. * ser-tcp.c: Ditto. * ser-unix.c: Ditto. * serial.c: Ditto. * serial.h: Ditto. * solib-frv.c: Ditto. * solib-irix.c: Ditto. * solib-osf.c: Ditto. * solib-pa64.c: Ditto. * solib-som.c: Ditto. * solib-sunos.c: Ditto. * solib-svr4.c: Ditto. * solib-target.c: Ditto. * solib.c: Ditto. * somread.c: Ditto. * source.c: Ditto. * stabsread.c: Ditto. * stabsread.c: Ditto. * stack.c: Ditto. * stack.h: Ditto. * symfile-mem.c: Ditto. * symfile.c: Ditto. * symfile.h: Ditto. * symmisc.c: Ditto. * symtab.c: Ditto. * symtab.h: Ditto. * target-descriptions.c: Ditto. * target-memory.c: Ditto. * target.c: Ditto. * target.h: Ditto. * terminal.h: Ditto. * thread.c: Ditto. * top.c: Ditto. * tracepoint.c: Ditto. * tracepoint.h: Ditto. * ui-file.c: Ditto. * ui-file.h: Ditto. * ui-out.h: Ditto. * user-regs.c: Ditto. * user-regs.h: Ditto. * utils.c: Ditto. * valarith.c: Ditto. * valops.c: Ditto. * valprint.c: Ditto. * valprint.h: Ditto. * value.c: Ditto. * varobj.c: Ditto. * varobj.h: Ditto. * vec.h: Ditto. * xcoffread.c: Ditto. * xcoffsolib.c: Ditto. * xcoffsolib.h: Ditto. * xml-syscall.c: Ditto. * xml-tdesc.c: Ditto.
2011-01-01run copyright.sh for 2011.Joel Brobecker1-1/+1
2010-12-15gdbTom Tromey1-0/+9
* infrun.c (save_infcall_control_state): Handle the exception-resume breakpoint. (restore_infcall_control_state): Likewise. (discard_infcall_control_state): Likewise. gdb/testsuite 2010-12-15 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.cp/nextoverthrow.cc (dummy): Return int 0. (NextOverThrowDerivates) <resumebpt>: New. (resumebpt_test): New. (main): Call resumebpt_test. * gdb.cp/nextoverthrow.exp: New block for test of "resumebpt".
2010-12-09gdbTom Tromey1-15/+177
PR c++/9593: * thread.c (clear_thread_inferior_resources): Call delete_longjmp_breakpoint. * infrun.c (handle_inferior_event): Handle exception breakpoints. (handle_inferior_event): Likewise. (insert_exception_resume_breakpoint): New function. (check_exception_resume): Likewise. * inferior.h (delete_longjmp_breakpoint_cleanup): Declare. * infcmd.c (delete_longjmp_breakpoint_cleanup): No longer static. (step_1): Set thread's initiating frame. (until_next_continuation): New function. (until_next_command): Support exception breakpoints. (finish_command_continuation): Delete longjmp breakpoint. (finish_forward): Support exception breakpoints. * gdbthread.h (struct thread_info) <initiating_frame>: New field. * breakpoint.h (enum bptype) <bp_exception, bp_exception_resume, bp_exception_master>: New constants. (struct bpstat_what) <is_longjmp>: New field. (set_longjmp_breakpoint): Update. * breakpoint.c (create_exception_master_breakpoint): New function. (update_breakpoints_after_exec): Handle bp_exception_master. Call create_exception_master_breakpoint. (print_it_typical): Handle bp_exception_master, bp_exception. (bpstat_stop_status): Handle bp_exception_master. (bpstat_what): Handle bp_exception_master, bp_exception, bp_exception_resume. (bptype_string): Likewise. (print_one_breakpoint_location): Likewise. (allocate_bp_location): Likewise. (set_longjmp_breakpoint): Handle exception breakpoints. Change interface. (delete_longjmp_breakpoint): Handle exception breakpoints. (mention): Likewise. (struct until_break_command_continuation_args) <thread_num>: New field. (until_break_command_continuation): Call delete_longjmp_breakpoint. (until_break_command): Support exception breakpoints. (delete_command): Likewise. (breakpoint_re_set_one): Likewise. (breakpoint_re_set): Likewise. gdb/testuite * gdb.java/jnpe.java: New file. * gdb.java/jnpe.exp: New file. * gdb.cp/nextoverthrow.exp: New file. * gdb.cp/nextoverthrow.cc: New file.
2010-11-28gdb/Jan Kratochvil1-19/+33
Fix step_resume_breakpoint unsaved during an infcall. * gdbthread.h (struct thread_control_state): Move here field step_resume_breakpoint ... (struct thread_info): ... from here. * infrun.c (save_infcall_control_state): Reset control.step_resume_breakpoint to NULL. (restore_infcall_control_state, discard_infcall_control_state): Delete control.step_resume_breakpoint. * arm-linux-tdep.c, infrun.c, thread.c: Update all the references to the moved field. gdb/testsuite/ Fix step_resume_breakpoint unsaved during an infcall. * gdb.base/step-resume-infcall.exp: New file. * gdb.base/step-resume-infcall.c: New file.
2010-11-28gdb/Jan Kratochvil1-265/+246
Rename and move inferior_thread_state and inferior_status. * gdbthread.h (struct thread_control_state): New struct, move fields step_range_start, step_range_end, step_frame_id, step_stack_frame_id, trap_expected, proceed_to_finish, in_infcall, step_over_calls, stop_step and stop_bpstat here from struct thread_info. (struct thread_suspend_state): New struct, move field stop_signal here from struct thread_info. (struct thread_info): Move the fields above from this struct. * inferior.h: Move the inferior_thread_state and inferior_status declarations comment to their definitions at infrun.c. (struct inferior_control_state): New struct, move field stop_soon from struct inferior here. (struct inferior_suspend_state): New empty struct. (struct inferior): New fields control and suspend. Move out field stop_soon. * infrun.c (struct inferior_thread_state): Rename to ... (infcall_suspend_state): ... here. Replace field stop_signal by fields thread_suspend and inferior_suspend. (save_inferior_thread_state): Rename to ... (save_infcall_suspend_state): ... here. New variable inf. Update the code for new fields. (restore_inferior_thread_state): Rename to ... (restore_infcall_suspend_state): ... here. New variable inf. Update the code for new fields. (do_restore_inferior_thread_state_cleanup): Rename to ... (do_restore_infcall_suspend_state_cleanup): ... here. (make_cleanup_restore_inferior_thread_state): Rename to ... (make_cleanup_restore_infcall_suspend_state): ... here. (discard_inferior_thread_state): Rename to ... (discard_infcall_suspend_state): ... here. (get_inferior_thread_state_regcache): Rename to ... (get_infcall_suspend_state_regcache): ... here. (struct inferior_status): Rename to ... (struct infcall_control_state): ... here. Replace fields step_range_start, step_range_end, step_frame_id, step_stack_frame_id, trap_expected, proceed_to_finish, in_infcall, step_over_calls, stop_step, stop_bpstat and stop_soon by fields thread_control and inferior_control. (save_inferior_status): Rename to ... (save_infcall_control_state): ... here. Update the code for new fields. (restore_inferior_status): Rename to ... (restore_infcall_control_state): ... here. Update the code for new fields. (do_restore_inferior_status_cleanup): Rename to ... (do_restore_infcall_control_state_cleanup): ... here. (make_cleanup_restore_inferior_status): Rename to ... (make_cleanup_restore_infcall_control_state): ... here. (discard_inferior_status): Rename to ... (discard_infcall_control_state): ... here. * alpha-tdep.c, breakpoint.c, dummy-frame.c, dummy-frame.h, exceptions.c, fbsd-nat.c, gdbthread.h, infcall.c, infcmd.c, inferior.c, inferior.h, infrun.c, linux-nat.c, mi/mi-interp.c, mips-tdep.c, procfs.c, solib-irix.c, solib-osf.c, solib-spu.c, solib-sunos.c, solib-svr4.c, thread.c, windows-nat.c: Update all the references to the moved fields and renamed functions.
2010-11-26gdb/Jan Kratochvil1-1/+5
* infcall.c (struct inferior_thread_state) <siginfo_gdbarch>: Fix up the comment. (save_inferior_thread_state): Reset tp->stop_signal.
2010-11-24gdb/Jan Kratochvil1-4/+3
Code cleanup. * infrun.c (struct inferior_status) <stepping_over_breakpoint> (save_inferior_status) <stepping_over_breakpoint> (restore_inferior_status) <stepping_over_breakpoint>: Rename to trap_expected. (struct inferior_status) <step_resume_break_address>: Remove.
2010-11-24gdb/Jan Kratochvil1-26/+45
* infrun.c (struct inferior_status, save_inferior_status) (restore_inferior_status): Group and reorder the fields, comment their groups.
2010-11-07gdb/Jan Kratochvil1-3/+3
* infrun.c (restore_inferior_thread_state): Use discard_inferior_thread_state to free the data. (discard_inferior_thread_state): xfree also siginfo_data.
2010-11-02gdb/Jan Kratochvil1-1/+3
Revert: 2010-10-17 Jan Kratochvil <jan.kratochvil@redhat.com> Pedro Alves <pedro@codesourcery.com> * gdbthread.h (currently_stepping): New declaration. * infrun.c (currently_stepping): Remove the forward declaration. (currently_stepping): Make it global. * linux-nat.c (resume_callback) <lp->stopped && lp->status == 0>: New variables tp and step, initialized them. Pass STEP to to_resume. Print also possibly "PTRACE_SINGLESTEP" if STEP. Initialize LP->STEP. * remote.c (currently_stepping_callback): New. (remote_vcont_resume) <ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid)>: New variable tp. Call currently_stepping_callback and step such thread. gdb/testsuite/ Revert: 2010-10-17 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.threads/sigstep-threads.exp: New file. * gdb.threads/sigstep-threads.c: New file.
2010-10-17gdb/Jan Kratochvil1-3/+1
* gdbthread.h (currently_stepping): New declaration. * infrun.c (currently_stepping): Remove the forward declaration. (currently_stepping): Make it global. * linux-nat.c (resume_callback) <lp->stopped && lp->status == 0>: New variables tp and step, initialized them. Pass STEP to to_resume. Print also possibly "PTRACE_SINGLESTEP" if STEP. Initialize LP->STEP. * remote.c (currently_stepping_callback): New. (remote_vcont_resume) <ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid)>: New variable tp. Call currently_stepping_callback and step such thread. gdb/testsuite/ * gdb.threads/sigstep-threads.exp: New file. * gdb.threads/sigstep-threads.c: New file.
2010-10-17gdb/Jan Kratochvil1-2/+11
* infrun.c (follow_exec): Replace symbol_file_add_main by symbol_file_add with SYMFILE_DEFER_BP_RESET, set_initial_language and breakpoint_re_set. * m32r-rom.c (m32r_load, m32r_upload_command): Use parameter 0 for clear_symtab_users. * objfiles.c (free_all_objfiles): Likewise. * remote-m32r-sdi.c (m32r_load): Likewise. * solib-som.c (som_solib_create_inferior_hook): Likewise. * symfile.c (new_symfile_objfile): New comment for add_flags. Call clear_symtab_users with ADD_FLAGS. (reread_symbols): Use parameter 0 for clear_symtab_users. (clear_symtab_users): New parameter add_flags. Do not call breakpoint_re_set if SYMFILE_DEFER_BP_RESET. (clear_symtab_users_cleanup): Use parameter 0 for clear_symtab_users. * symtab.h (clear_symtab_users): New parameter add_flags. gdb/testsuite/ * gdb.base/pie-execl.exp: New file. * gdb.base/pie-execl.c: New file.
2010-09-24gdb/Jan Kratochvil1-3/+55
Fix lost siginfo_t for inferior calls. * infrun.c (struct inferior_thread_state) <siginfo_gdbarch, siginfo_data>: New. (save_inferior_thread_state): New variables regcache, gdbarch and siginfo_data. Initialize SIGINFO_DATA if gdbarch_get_siginfo_type_p. Move INF_STATE allocation later, pre-clear it. Initialize REGISTERS using REGCACHE. (restore_inferior_thread_state): New variables regcache and gdbarch. Restore SIGINFO_DATA for matching GDBARCH. Restore REGISTERS using REGCACHE. Free also SIGINFO_DATA. gdb/testsuite/ Fix lost siginfo_t for inferior calls. * gdb.base/siginfo-infcall.exp: New file. * gdb.base/siginfo-infcall.c: New file.
2010-09-06 * infrun.c (resume): Extend comment on ignoring single-stepPedro Alves1-5/+11
requests on vfork parents waiting for a vfork-done.
2010-09-062010-09-06 Yao Qi <yao@codesourcery.com>Yao Qi1-2/+20
* infrunc(resume): When inferior is waiting_for_vfork_done, clear step and don't use displaced stepping.
2010-09-04gdb/Jan Kratochvil1-130/+127
Code cleanup - split print_stop_reason. * infrun.c (enum inferior_stop_reason): Remove. (print_stop_reason): Remove by splitting into ... (print_exited_reason, print_signal_exited_reason) (print_no_history_reason, print_signal_received_reason) (print_end_stepping_range_reason): ... these new functions. Update the preceding comment. (handle_inferior_event): Change the calls to print_exited_reason, print_signal_exited_reason, print_no_history_reason, print_signal_received_reason, print_end_stepping_range_reason. (handle_step_into_function, handle_step_into_function_backward): Change the calls to print_end_stepping_range_reason.
2010-08-312010-08-31 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>Michael Snyder1-0/+5
* infrun.c (set_exec_direction_func): Error out if target does not support reverse execution.
2010-07-192010-07-19 Hui Zhu <teawater@gmail.com>Hui Zhu1-1/+2
* breakpoint.c (single_step_breakpoints_inserted): New function. * breakpoint.h (single_step_breakpoints_inserted): Extern. * infrun.c (maybe_software_singlestep): Add check code. * record.c (record_resume): Add code for software single step. (record_wait): Ditto.
2010-07-01 * breakpoint.c (update_watchpoint, _initialize_breakpoint): RemovePedro Alves1-2/+2
unnecessary space in string. * filesystem.c (_initialize_filesystem): Ditto. * frame.c (_initialize_frame): Ditto. * infcmd.c (step_once): Ditto. * infrun.c (_initialize_infrun): Ditto. * linux-nat.c (linux_child_follow_fork): Ditto. * maint.c (maintenance_deprecate): Ditto. * memattr.c (_initialize_mem): Ditto. * mips-tdep.c (_initialize_mips_tdep): Ditto. * monitor.c (monitor_open): Ditto. * procfs.c (procfs_xfer_memory): Ditto. * reverse.c (bookmarks_info): Ditto. * sh64-tdep.c (sh64_show_media_regs, sh64_show_compact_regs): Ditto. * stack.c (_initialize_stack): Ditto. * tracepoint.c (_initialize_tracepoint): Ditto. * xtensa-tdep.c (xtensa_supply_gregset, xtensa_regset_from_core_section): Ditto.
2010-06-24gdb/Jan Kratochvil1-62/+9
Fix PR 9436. * breakpoint.c (handle_jit_event): New function. (bpstat_what): Remove enum class, kc, ss, sn, sgl, slr, clr, sr, shl, jit, err, table and bs_class. New variables shlib_event, jit_event, this_action and bptype. Change bs_class assignments to this_action assignments. new unhandled bptype internal error. Move here shlib_event and jit_event handling from handle_inferior_event. * breakpoint.h (enum bpstat_what_main_action): Extend the comment. Reorder items. Remove BPSTAT_WHAT_CHECK_SHLIBS and BPSTAT_WHAT_CHECK_JIT. * inferior.h (debug_infrun, stop_on_solib_events): New declarations. * infrun.c (debug_infrun, stop_on_solib_events): Remove static. (handle_inferior_event): Reinitialize frame and gdbarch after bpstat_what call. Move BPSTAT_WHAT_CHECK_SHLIBS and BPSTAT_WHAT_CHECK_JIT handling to bpstat_what. Reinitialize even gdbarch when frame gets reinitialized. gdb/testsuite/ Test PR 9436. * gdb.base/nostdlib.exp, gdb.base/nostdlib.c: New.
2010-06-23ChangeLog:Ulrich Weigand1-0/+12
* infrun.c (handle_inferior_event): Handle presence of single-step breakpoints for TARGET_WAITKIND_FORKED and TARGET_WAITKIND_VFORKED. Cancel single-step breakpoints for TARGET_WAITKIND_EXITED, TARGET_WAITKIND_SIGNALED, and TARGET_WAITKIND_EXECD. * breakpoint.c (detach_single_step_breakpoints): New function. (detach_breakpoints): Call it. (cancel_single_step_breakpoints): New function. * breakpoint.h (cancel_single_step_breakpoints): Add prototype. * spu-tdep.c (spu_memory_remove_breakpoint): New function. (spu_gdbarch_init): Install it. testsuite/ChangeLog: * gdb.cell/fork.exp: New file. * gdb.cell/fork.c: Likewise. * gdb.cell/fork-spu.c: Likewise.
2010-06-122010-06-11 Stan Shebs <stan@codesourcery.com>Stan Shebs1-1/+92
Add per-operation permission flags. * target.h (struct target_ops): New method to_set_permissions. (target_set_permissions): New macro. (target_insert_breakpoint): Change macro to function. (target_remove_breakpoint): Ditto. (target_stop): Ditto. (may_write_registers): Declare. (may_write_memory): Declare. (may_insert_breakpoints): Declare. (may_insert_tracepoints): Declare. (may_insert_fast_tracepoints): Declare. (may_stop): Declare. * target.c (may_write_registers, may_write_registers_1): New globals. (may_write_memory, may_write_memory_1): New globals. (may_insert_breakpoints, may_insert_breakpoints_1): New globals. (may_insert_tracepoints, may_insert_tracepoints_1): New globals. (may_insert_fast_tracepoints, may_insert_fast_tracepoints_1): New globals. (may_stop, may_stop_1): New global. (target_xfer_partial): Test for write permission. (target_store_registers): Ditto. (target_insert_breakpoint): New function. (target_remove_breakpoint): New function. (target_stop): New function. (_initialize_targets): Add new set/show variables. (set_write_memory_permission): New function. (update_target_permissions): New function. (set_target_permissions): New function. (update_current_target): Default to_set_permissions. (_initialize_targets): Use new globals and setter function. * tracepoint.c (start_tracing): Test for permission. * inferior.h (update_observer_mode): Declare. * infrun.c (non_stop_1): Define earlier. (observer_mode, observer_mode_1): New globals. (set_observer_mode, show_observer_mode): New functions. (update_observer_mode): New function. (_initialize_infrun): Define "set observer" command. * remote.c (PACKET_QAllow): New optional packet. (remote_protocol_features): Add QAllow. (remote_set_permissions): New function. (remote_start_remote): Call it. (init_remote_ops): Add it to target vector. (_initialize_remote): Add config command for QAllow. * gdb.texinfo (Observer Mode): New section. (General Query Packets): Document QAllow. * gdb.base/permissions.exp: New file.
2010-05-17Revert previous change that inadvertently added reset_schedlock, andPedro Alves1-13/+0
revert changes done on top on that.
2010-05-17Add reset_schedlock declaration in target.h.Joel Brobecker1-2/+3
This patches improves a couple of previous patches: - one that introduces reset_schedlock, but failed to add a declarationl; - one that was checked in to avoid a compilation failure due to that missing declaration. It also improves the declaration itself to better conform to our coding practices. Same for the comments. 2010-05-17 Joel Brobecker <brobecker@adacore.com> * target.h (reset_schedlock): Add declaration. * infrun.c (reset_schedlock): Add missing void in function profile. * target.c (target_mourn_inferior): Delete local declaration of reset_schedlock. Style-fix in comment.
2010-05-142010-05-14 Michael Snyder <msnyder@vmware.com>Michael Snyder1-1/+37
* infcall.c: White space. * inf-child.c: White space. * infcmd.c: White space. * inferior.c: White space. * inf-loop.c: White space. * inflow.c: White space. * inline-frame.c: White space. * interps.c: White space.
2010-05-062010-05-06 Michael Snyder <msnyder@vmware.com>Michael Snyder1-4/+1
* linespec.c (decode_compound): Delete unused variable. * dictionary.c (iterator_next_hashed): Delete unused variable. * infcall.c (call_function_by_hand): Delete unused variable. * infcmd.c (step_1): Delete unused variable. (registers_info): Delete unused variable. (attach_command): Delete unused variable. * infrun.c (follow_exec): Delete unused variable. (handle_step_into_function_backwards): Delete unused variable. (_initialize_infrun): Delete unused variable. * stack.c (parse_frame_specification_1): Delete unused variable. (frame_info): Delete unused variable. (backtrace_command_1): Delete unused variable. (catch_info): Delete unused variable.
2010-05-01 * infrun.c (prepare_for_detach): In non-stop, context switch toPedro Alves1-0/+8
the thread that got the event before handling the event.
2010-04-26 PR breakpoints/11531.Pierre Muller1-22/+0
* config/i386/nm-i386sol2.h (CANNOT_STEP_HW_WATCHPOINTS): Remove macro definition and related comment. * infrun.c (CANNOT_STEP_HW_WATCHPOINTS): Remove macro. (resume): Remove code and comment related to this macro. doc ChangeLog entry: * gdbint.texinfo (CANNOT_STEP_HW_WATCHPOINTS): Remove explanation of macro deleted from GDB code.
2010-03-25 PR gdb/11327, PR gdb/11328, PR breakpoints/11368:Tom Tromey1-4/+4
* infrun.c (handle_inferior_event): Change initialization of stop_stack_dummy. (handle_inferior_event): Change assignment to stop_stack_dummy. (normal_stop): Update use of stop_stack_dummy. (struct inferior_status) <stop_stack_dummy>: Change type. * inferior.h (stop_stack_dummy): Update. * infcmd.c (stop_stack_dummy): Change type. * infcall.c (cleanup_delete_std_terminate_breakpoint): New function. (call_function_by_hand): Call set_std_terminate_breakpoint. Rewrite std::terminate handling. * breakpoint.h (enum bptype) <bp_std_terminate, bp_std_terminate_master>: New. (enum stop_stack_kind): New. (struct bpstat_what) <call_dummy>: Change type. (set_std_terminate_breakpoint, delete_std_terminate_breakpoint): Declare. * breakpoint.c (create_std_terminate_master_breakpoint): New function. (update_breakpoints_after_exec): Handle bp_std_terminate_master. Call create_std_terminate_master_breakpoint. (print_it_typical): Handle new breakpoint kinds. (bpstat_stop_status): Handle bp_std_terminate_master. (bpstat_what): Correctly set call_dummy field. Handle bp_std_terminate_master and bp_std_terminate. (print_one_breakpoint_location): Update. (allocate_bp_location): Update. (set_std_terminate_breakpoint): New function. (delete_std_terminate_breakpoint): Likewise. (create_thread_event_breakpoint): Update. (delete_command): Update. (breakpoint_re_set_one): Update. (breakpoint_re_set): Call create_std_terminate_master_breakpoint.
2010-03-14 * infrun.c (ptid_match): Don't assert that PTID is not a pid ptid.Pedro Alves1-2/+1
2010-02-24 PR gdb/11321Pedro Alves1-1/+81
* inferior.h (prepare_for_detach): Declare. (struct inferior) <detaching>: New field. * infrun.c (prepare_for_detach): New. (handle_inferior_event) <random signal>: Don't stop if detaching. * target.c (target_detach): Call prepare_for_detach.
2010-02-24 Per-process displaced stepping queue.Pedro Alves1-86/+199
* infrun.c (displaced_step_ptid, displaced_step_request_queue) (displaced_step_gdbarch, displaced_step_closure, (displaced_step_original, displaced_step_copy): Move globals to this... (struct displaced_step_inferior_state): ... new structure. (displaced_step_inferior_states): New global. (get_displaced_stepping_state, add_displaced_stepping_state) (remove_displaced_stepping_state, infrun_inferior_exit): New functions. (displaced_step_clear): Add displaced_step_inferior_state parameter, and adjust to handle it. (displaced_step_clear_cleanup): Parameter is now a displaced_step_inferior_state. Adjust. (displaced_step_prepare): Adjust. (displaced_step_fixup, displaced_step_fixup) (infrun_thread_ptid_changed, resume): Adjust. (init_wait_for_inferior): Don't call displaced_step_clear. (infrun_thread_stop_requested): Rewrite. (_initialize_infrun): Install infrun_inferior_exit as inferior_exit observer.
2010-02-24 * inferior.h (ptid_match): Declare.Pedro Alves1-0/+20
* infrun.c (ptid_match): New. * remote.c (queued_stop_reply): Rewrite and use ptid_match. (handle_notification): Add debug output. * linux-nat.c (ptid_match): Delete.
2010-02-24 * tracepoint.h (set_traceframe_number)Pedro Alves1-0/+11
(cleanup_restore_current_traceframe): Declare. * tracepoint.c (set_traceframe_number): New. (struct current_traceframe_cleanup): New. (do_restore_current_traceframe_cleanup) (restore_current_traceframe_cleanup_dtor) (make_cleanup_restore_current_traceframe): New. * infrun.c: Include tracepoint.h. (fetch_inferior_event): Switch out and in of tfind mode.
2010-02-08 * infrun.c (handle_inferior_event): Do not look up regcacheUlrich Weigand1-9/+11
for exited processes.
2010-01-29 * infrun.c (prepare_to_proceed): Handle other signals which mightDaniel Jacobowitz1-21/+29
match a breakpoint. (handle_inferior_event): Move the check for unusual breakpoint signals earlier. gdbserver/ * linux-low.c (get_stop_pc): Check for SIGTRAP. (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible breakpoints.
2010-01-19Delete unused or undefined functions.Joel Brobecker1-20/+8
* breakpoint.c (ep_parse_optional_filename): Delete. * dcache.c (dcache_write_line): Remove declaration. * infrun.c (build_infrun): Remove declaration. * tracepoint.c (tracepoint_save_command): Remove declaration. * linux-nat.c (init_lwp_list): Delete. No longer used. * event-loop.c (check_async_signal_handlers): Delete declaration. * infrun.c (init_execution_control_state): Delete. (proceed): Update comment to avoid mentioning init_execution_control_state. * target.c (kill_or_be_killed, nosupport_runtime): Delete. * ada-lang.c (ada_to_static_fixed_value): Delete. * scm-lang.c (evaluate_subexp_scm): Delete declaration. * cp-namespace.c (cp_copy_usings): Delete. * xml-syscall.c (xml_number_of_syscalls): Delete. * progspace.c (find_program_space_by_num): Delete. * inflow.c (handle_sigio): Delete declaration. * hppa-tdep.c (hppa_alignof): Delete. * mipsnbsd-tdep.c (mipsnbsd_sigtramp_offset) (mipsnbsd_core_osabi_sniffer): Delete.
2010-01-09GDB crash while stepping into function.Joel Brobecker1-0/+5
* infrun.c (handle_inferior_event): Refetch the current frame after handling what.main_action, in case that pointer became dangling.
2010-01-08gdb/Jan Kratochvil1-1/+1
Add from_tty to solib_create_inferior_hook. * infcmd.c (post_create_inferior): Move solib_add after solib_create_inferior_hook. Pass from_tty to solib_create_inferior_hook. Call solib_add and SOLIB_ADD with 0 from_tty and comment why. * infrun.c (follow_exec): Pass from_tty solib_create_inferior_hook as 0. * linux-nat.c (linux_child_follow_fork): Likewise. * nto-procfs.c (procfs_post_attach, procfs_create_inferior): Likewise. * solib-darwin.c (darwin_solib_create_inferior_hook): New parameter from_tty. * solib-frv.c (frv_solib_create_inferior_hook): Likewise. * solib-irix.c (irix_solib_create_inferior_hook): Likewise. * solib-null.c (null_solib_create_inferior_hook): Likewise. * solib-osf.c (osf_solib_create_inferior_hook): Likewise. * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise. * solib-som.c (som_solib_create_inferior_hook): Likewise. * solib-spu.c (spu_solib_create_inferior_hook): New parameter from_tty. Pass it to svr4_so_ops.solib_create_inferior_hook. * solib-sunos.c (sunos_solib_create_inferior_hook): New parameter from_tty. * solib-svr4.c (enable_break): New parameter from_tty. Pass it to solib_add. (svr4_solib_create_inferior_hook): New parameter from_tty. Pass it to enable_break. * solib-target.c (solib_target_solib_create_inferior_hook): New parameter from_tty. * solib.c (solib_create_inferior_hook): New parameter from_tty. Pass it to ops->solib_create_inferior_hook. (reload_shared_libraries): Pass from_tty to solib_create_inferior_hook. Move solib_add after solib_create_inferior_hook, call it now with from_tty as 0. New comment there. * solib.h (solib_create_inferior_hook): New parameter from_tty. * solist.h (struct target_so_ops <solib_create_inferior_hook>): Likewise.
2010-01-08 Fix multiexec race.Vladimir Prus1-1/+2
* infrun.c (handle_inferior_event): Use get_thread_regcache with events ptid, not get_current_regcache.
2010-01-052010-01-05 Michael Snyder <msnyder@vmware.com>Michael Snyder1-1/+1
* infrun.c (handle_inferior_event): Fix typo in comment.
2010-01-01Update copyright year in most headers.Joel Brobecker1-1/+1
Automatic update by copyright.sh.
2009-11-20 * infrun.c (handle_inferior_event): Hardware hatchpoint traps arePedro Alves1-0/+16
never random signals. * breakpoint.c (update_global_location_list): Always delete immediately delete hardware watchpoint locations and other locations whose target address isn't meaningful. Update comment explaining the hazard of moribund locations.
2009-11-17gdb/Jan Kratochvil1-0/+5
Fix wrong debug output with `set debug infrun 1'. * gdb/infrun.c (handle_inferior_event <debug_infrun>): New variable old_chain. Temporarily switch INFERIOR_PTID. * target.h (target_stopped_by_watchpoint): Extend the comment. (target_stopped_data_address): New comment.
2009-11-15 * infrun.c (handle_inferior_event): When handling a fork or vforkPedro Alves1-1/+5
event, check if the bpstat causes a stop, instead of if it explains the signal. * breakpoint.c (bpstat_causes_stop): New. * breakpoint.h (bpstat_causes_stop): Declare.
2009-11-15 * breakpoint.c (should_be_inserted): Don't insert breakpoints ifPedro Alves1-0/+1
the pspace doesn't allow breakpoints. (insert_breakpoint_locations): Remove waiting_for_vfork_done special case. Expect watchpoints that shouldn't be inserted, to not be inserted. * progspace.h (struct program_space) <breakpoints_not_allowed>: New field. * infrun.c (handle_inferior_event): Clear it. * linux-nat.c (linux_child_follow_fork): Set it.