aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
AgeCommit message (Collapse)AuthorFilesLines
2011-05-202011-05-20 Pedro Alves <pedro@codesourcery.com>Pedro Alves1-0/+2
* infrun.c (proceed): Switch the inferior event loop to INF_EXEC_COMPLETE if the target refused to resume from a vfork/fork.
2011-05-202011-05-20 Pedro Alves <pedro@codesourcery.com>Pedro Alves1-22/+40
gdb/ * infcmd.c: Include "inf-loop.h". (step_once): When stepping into an inline subroutine, pretend the target has run. If the target can async, switch the inferior event loop to INF_EXEC_COMPLETE. * inferior.h (user_visible_resume_ptid): Declare. * infrun.c (user_visible_resume_ptid): New function, factored out from `resume'. (resume): Use it. * mi/mi-main.c (mi_execute_async_cli_command): Remove assertion that the current thread is running. Merge async and sync branches.
2011-05-182011-05-18 Pedro Alves <pedro@codesourcery.com>Pedro Alves1-2/+10
gdb/ * infrun.c (resume): Mention which is the current thread, and its current PC in debug output. (prepare_to_proceed): Mention the thread switching in debug output.
2011-05-172011-05-17 Tomas Martinec <fyzmat@gmail.com>Pedro Alves1-0/+2
gdb/ * infrun.c (handle_inferior_event) <handling deferred step>: Clear trap_expected.
2011-05-092011-05-09 Pedro Alves <pedro@codesourcery.com>Pedro Alves1-17/+4
* inferior.h (wait_for_inferior): Remove `thread_exec_as_sigtrap' parameter. * infrun.c (proceed, start_remote): Adjust. (wait_for_inferior): Remove `thread_exec_as_sigtrap' parameter, and adjust to not handle it. * 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. * windows-nat.c (do_initial_windows_stuff): Adjust. * infcmd.c (attach_command): Adjust. (notice_new_inferior): Adjust.
2011-04-28 gdb/Ulrich Weigand1-36/+63
* infrun.c (proceed): Revert previous change. (resume): Instead, handle the case of signal delivery while stepping off a breakpoint location here, and only if software single-stepping is used. Handle nested signals. gdb/testsuite/ * gdb.base/signest.exp: New file. * gdb.base/signest.c: Likewise.
2011-04-27ChangeLog:Ulrich Weigand1-24/+46
* infrun.c (proceed): Do not single-step into signal delivery when stepping off a breakpoint location. (insert_step_resume_breakpoint_at_frame): Move prototype earlier. (insert_step_resume_breakpoint_at_caller): Likewise. (insert_step_resume_breakpoint_at_sal): Likewise. (insert_longjmp_resume_breakpoint): Likewise. testsuite/ChangeLog: * gdb.base/annota1.exp: Accept breakpoints-invalid annotation while delivering signal.
2011-04-27 * target.h (struct target_ops): Remove to_notice_signals;Ulrich Weigand1-2/+53
add to_pass_signals. (target_notice_signals): Remove. (target_pass_signals): Add prototype. * target.c (update_current_target): Remove to_notice_signals; mention to_pass_signals. (target_pass_signals): New function. (debug_to_notice_signals): Remove. (setup_target_debug): Do not install debug_to_notice_signals. * infrun.c (signal_pass): New global. (resume): Call target_pass_signals. (handle_inferior_event): Report all signals while stepping over non-steppable watchpoint. Reset trap_expected to ensure breakpoints are re-inserted when stepping over a signal handler. (signal_cache_update): New function. (signal_stop_update): Call it. (signal_print_update): Likewise. (signal_pass_update): Likewise. (handle_command): Call signal_cache_update and target_pass_signals instead of target_notice_signals. (_initialize_infrun): Initialize signal_pass. * linux-nat.c (pass_mask): New global. (linux_nat_pass_signals): New function. (linux_nat_create_inferior): Report all signals initially. (linux_nat_attach): Likewise. (linux_nat_resume): Use pass_mask to decide whether to directly handle an inferior signal. (linux_nat_wait_1): Likewise. (linux_nat_add_target): Install to_pass_signals callback. * nto-procfs.c (notice_signals): Remove. (procfs_resume): Do not call notice_signals. (procfs_notice_signals): Remove. (procfs_pass_signals): New function. (init_procfs_ops): Install to_pass_signals callback instead of to_notice_signals callback. (_initialize_procfs): Report all signals initially. * procfs.c (procfs_notice_signals): Remove. (procfs_pass_signals): New function. (procfs_target): Install to_pass_signals callback instead of to_notice_signals callback. (register_gdb_signals): Remove. (procfs_debug_inferior): Report all signals initially. (procfs_init_inferior): Remove redundant register_gdb_signals call. * remote.c (remote_pass_signals): Add numsigs and pass_signals parameters; use them instead of calling signal_..._state routines. (remote_notice_signals): Remove. (remote_start_remote): Report all signals initially. (remote_resume): Do not call remote_pass_signals. (_initialize_remote): Install to_pass_signals callback instead of to_notice_signals callback.
2011-04-202011-04-20 Pedro Alves <pedro@codesourcery.com>Pedro Alves1-5/+0
gdb/ * regcache.c (get_thread_arch_regcache): If creating a regcache for null_ptid, assume and allow a NULL address space, instead of asking the target for the ptid's address space. * infrun.c (ptid_is_pid): Remove assertion. gdb/testsuite/ * gdb.base/maint.exp: Test that "maint print registers" works without a running program.
2011-04-19gdbTom Tromey1-1/+1
* windows-tdep.c (windows_xfer_shared_library): * windows-nat.c (get_module_name, windows_make_so): * v850-tdep.c (v850_handle_pushm): * utils.c (null_cleanup, gdb_realpath): * ui-out.c (get_next_header): * tracepoint.c (clear_traceframe_info): * symtab.c (lookup_symtab): * serial.h (struct serial_ops): * mipsread.c (read_alphacoff_dynamic_symtab): * infcmd.c (print_return_value): * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): * f-exp.y (parse_number): * exceptions.c (catch_exceptions): * dummy-frame.c (dummy_frame_this_id): * defs.h (struct cleanup): * breakpoint.c (disable_breakpoints_in_unloaded_shlib): * arm-tdep.c (arm_push_dummy_call): * amd64-tdep.h (amd64_collect_xsave): * amd64-tdep.c (amd64_collect_xsave): * alpha-tdep.c (alpha_heuristic_frame_unwind_cache): * README (typing): Remove duplicate words. * cli/cli-decode.c (lookup_cmd_composition): Add comma. * infrun.c (siginfo_value_read): Fix typo. * solib-frv.c (frv_fdpic_find_global_pointer): Likewise. * top.c (source_line_number): Add comma. gdb/doc * gdbint.texinfo (Register Information Functions): Remove duplicate "the". * gdb.texinfo (Emacs): Remove duplicate "to". (GDB/MI Variable Objects): Remove duplicate "the". (General Query Packets): Likewise. gdb/testsuite * gdb.mi/mi-nsmoribund.exp: * gdb.hp/gdb.objdbg/objdbg01.exp: * gdb.base/structs.exp (test_struct_returns): * gdb.base/call-sc.exp (test_scalar_returns): * gdb.base/bigcore.exp: Remove duplicate words. gdb/gdbserver * win32-low.c (handle_load_dll): Remove duplicate "the".
2011-03-07gdbTom Tromey1-3/+14
* infrun.c (print_exited_reason): Include inferior id and pid in message. gdb/testsuite * lib/opencl.exp (skip_opencl_tests): Update for exit message change. * lib/mi-support.exp (mi_gdb_test): Update for exit message change. * lib/gdb.exp (gdb_test_multiple): Update comment. Update for exit message change. (skip_altivec_tests): Update for exit message change. (skip_vsx_tests): Likewise. (gdb_continue_to_end): Likewise. Add 'command' argument. * lib/cell.exp (skip_cell_tests): Update for exit message change. * gdb.threads/tls.exp: Update for exit message change. * gdb.threads/thread-unwindonsignal.exp: Use gdb_continue_to_end. * gdb.threads/step.exp (step_it): Update for exit message change. (continue_all): Likewise. * gdb.threads/print-threads.exp (test_all_threads): Update for exit message change. * gdb.threads/interrupted-hand-call.exp: Use gdb_continue_to_end. * gdb.threads/execl.exp: Use gdb_continue_to_end. * gdb.python/py-prettyprint.exp (run_lang_tests): Use gdb_continue_to_end. * gdb.hp/gdb.objdbg/objdbg02.exp: Use gdb_continue_to_end. * gdb.hp/gdb.objdbg/objdbg01.exp: Use gdb_continue_to_end. * gdb.hp/gdb.defects/solib-d.exp: Update for exit message change. * gdb.cp/method.exp: Update for exit message change. * gdb.cp/mb-templates.exp: Update for exit message change. * gdb.cp/mb-inline.exp: Use gdb_continue_to_end. * gdb.cp/annota3.exp: Update for exit message change. * gdb.cp/annota2.exp: Update for exit message change. * gdb.cell/fork.exp: Use gdb_continue_to_end. * gdb.base/term.exp: Update for exit message change. * gdb.base/step-test.exp (test_i): Update for exit message change. * gdb.base/sigstep.exp (advance): Update for exit message change. (advancei): Likewise. * gdb.base/siginfo.exp: Update for exit message change. * gdb.base/shlib-call.exp: Use gdb_continue_to_end. * gdb.base/reread.exp: Use gdb_continue_to_end. * gdb.base/langs.exp: Use gdb_continue_to_end. * gdb.base/interrupt.exp: Update for exit message change. * gdb.base/gdb1555.exp: Update for exit message change. * gdb.base/exe-lock.exp: Use gdb_continue_to_end. * gdb.base/ending-run.exp: Update for exit message change. * gdb.base/chng-syms.exp: Update for exit message change. * gdb.base/checkpoint.exp: Update for exit message change. * gdb.base/catch-syscall.exp (check_for_program_end): Use gdb_continue_to_end. (test_catch_syscall_with_wrong_args): Likewise. * gdb.base/call-signal-resume.exp: Use gdb_continue_to_end. * gdb.base/break-interp.exp (test_ld): Update for exit message change. * gdb.base/bang.exp: Update for exit message change. * gdb.base/attach.exp (do_attach_tests): Use gdb_continue_to_end. (do_call_attach_tests): Likewise. * gdb.base/a2-run.exp: Update for exit message change. * gdb.arch/ppc-dfp.exp: Update for exit message change. * gdb.ada/tasks.exp: Use gdb_continue_to_end. * gdb.ada/catch_ex.exp: Use gdb_continue_to_end.
2011-03-012011-02-28 Michael Snyder <msnyder@vmware.com>Michael Snyder1-1/+0
* infrun.c (handle_inferior_event): Remove unused function call.
2011-02-162011-02-16 Yao Qi <yao@qiyaows>Yao Qi1-0/+18
* infrun.c (get_displaced_step_closure_by_addr): New. * inferior.h: Declare it. * arm-tdep.c: (arm_pc_is_thumb): Call get_displaced_step_closure_by_addr. Adjust MEMADDR if it returns non-NULL.
2011-02-14 gdb/Pedro Alves1-1/+1
* target.c (target_read_live_memory): New function. (memory_xfer_live_readonly_partial): New. (memory_xfer_partial): If reading from a traceframe, fallback to reading unavailable read-only memory from read-only regions of live target memory. * tracepoint.c (disconnect_tracing): Adjust. (set_current_traceframe): New, factored out from set_traceframe_number. (set_traceframe_number): Reimplement to only change the traceframe number on the GDB side. (do_restore_current_traceframe_cleanup): Adjust. (make_cleanup_restore_traceframe_number): New. (cur_traceframe_number): New global. (tfile_open): Set cur_traceframe_number to no traceframe. (set_tfile_traceframe): New function. (tfile_trace_find): If looking up a traceframe using any method other than by number, make sure the current tfile traceframe matches gdb's current traceframe. Update the current tfile traceframe if the lookup succeeded. (tfile_fetch_registers, tfile_xfer_partial) (tfile_get_trace_state_variable_value): Make sure the remote traceframe matches gdb's current traceframe. * remote.c (remote_traceframe_number): New global. (remote_open_1): Set it to -1. (set_remote_traceframe): New function. (remote_fetch_registers, remote_store_registers) (remote_xfer_memory, remote_xfer_partial) (remote_get_trace_state_variable_value): Make sure the remote traceframe matches gdb's current traceframe. (remote_trace_find): If looking up a traceframe using any method other than by number, make sure the current remote traceframe matches gdb's current traceframe. Update the current remote traceframe if the lookup succeeded. * infrun.c (fetch_inferior_event): Adjust. * tracepoint.h (set_current_traceframe): Declare. (get_traceframe_number, set_traceframe_number): Add describing comments.
2011-02-11 * infrun.c (proceed): Move switching out and in of tfind mode fromPedro Alves1-10/+10
here ... (fetch_inferior_event): ... to here.
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.