aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-fork.c
AgeCommit message (Collapse)AuthorFilesLines
2008-04-24 * breakpoint.h (bp_location_p): New typedef.Vladimir Prus1-0/+7
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-01-11 * exec.c: #include "arch-utils.h"Markus Deuling1-1/+1
(print_section_info): Use gdbarch_from_bfd to get at the current architecture. Replace current_gdbarch. Fix indention. Replace deprecated_print_address_numeric by paddress. * Makefile.in (exec.o) Add dependency to arch-utils.h. * valprint.c (val_print_string): Replace deprecated_print_address_numeric. * tracepoint.c (trace_mention, scope_info): Likewise. * symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1, print_symbol) (print_symbol, print_partial_symbols, maintenance_info_psymtabs) (maintenance_check_symtabs): Likewise. * symfile.c (list_overlays_command): Likewise. * stack.c (frame_info, print_block_frame_labels): Likewise. * printcmd.c (print_address, print_address_demangle) (address_info): Likewise. * corefile.c (memory_error): Likewise. * infcmd.c (jump_command): Likewise. * breakpoint.c (insert_bp_location, describe_other_breakpoints) (mention, delete_breakpoint): Likewise. * c-valprint.c (print_function_pointer_address, c_val_print): Likewise. * dwarf2read.c (dump_die): Likewise. * ada-valprint.c (ada_val_print_1): Likewise. * f-valprint.c (f_val_print): Likewise. * linux-fork.c (info_forks_command): Likewise. * m32r-com.c (m32r_load_section, m32r_load) (m32r_upload_command): Likewise. * ui-out.c (ui_out_field_core_addr): Remove unnecessary comment.
2008-01-01 Updated copyright notices for most files.Daniel Jacobowitz1-1/+1
2007-10-082007-10-08 Pierre Muller <muller@ics.u-strasbg.fr>Pierre Muller1-1/+1
* linux-fork.c: ARI fix: include "gdb_dirent.h" instead of <dirent.h>. Makefile.in (linux-fork.o): Add gdb_dirent.h dependency.
2007-10-082007-10-08 Pierre Muller <muller@ics.u-strasbg.fr>Pierre Muller1-1/+1
* linux-fork.c: Move "gdb_wait.h" include back to the position of <sys/wait.h> include before last commit.
2007-10-082007-10-08 Pierre Muller <muller@ics.u-strasbg.fr>Pierre Muller1-1/+1
* linux-fork.c: ARI fix: include "gdb_wait.h" instead of <sys/wait.h>. Makefile.in (linux-fork.o): Add gdb_wait.h dependency.
2007-08-23 Switch the license of all .c files to GPLv3.Joel Brobecker1-4/+2
Switch the license of all .h files to GPLv3. Switch the license of all .cc files to GPLv3.
2007-06-16 * regcache.c (struct regcache): Add ptid_t member.Ulrich Weigand1-2/+2
(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-02-28 * frame.c (frame_pop, frame_observer_target_changed): CallDaniel Jacobowitz1-4/+0
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-01-09Copyright updates for 2007.Daniel Jacobowitz1-1/+1
2006-10-27 * gdbcmd.h (detachlist): Declare.Andreas Schwab1-4/+5
* infcmd.c (_initialize_infcmd): Define "detach" as prefix command. * linux-fork.c (_initialize_linux_fork): Rename "detach-checkpoint" to "detach checkpoint" and "detach-fork" to "detach fork". * cli/cli-cmds.c (detachlist): Define. (init_cmd_lists): Initialize it. * cli/cli-cmds.h (detachlist): Declare. doc/: * gdb.texinfo (Processes): Rename "detach-fork" to "detach fork". testsuite/: * gdb.base/multi-forks.exp: Use "detach fork" instead of "detach-fork".
2006-04-272006-04-26 Michael Snyder <msnyder@redhat.com>Michael Snyder1-4/+21
* linux-fork.c (_initialize_linux_fork): Rename "delete-fork" command to "delete fork" (no hyphen), compatible with other "delete" commands. (info_forks_command): Accept a fork ID argument, for info on a single fork. Report if no matching forks. 2006-04-26 Michael Snyder <msnyder@redhat.com> * gdb.base/multi-forks.exp: Modify patterns for "run to exit", which may have to consume output from other forks. Add tests to make sure that "delete fork" succeeded. 2006-04-27 Michael Snyder <msnyder@redhat.com> * gdb.texinfo (delete-fork): Command renamed to "delete fork".
2006-03-24 * linux-nat.c (linux_ops_saved): New.Daniel Jacobowitz1-1/+4
(super_mourn_inferior, kill_inferior, threaded, linux_nat_ops) (child_mourn_inferior, child_wait, linux_nat_create_inferior) (linux_nat_fetch_registers, linux_nat_store_registers) (linux_nat_child_post_startup_inferior, init_linux_nat_ops): Delete. (init_lwp_list): Don't set threaded. (add_lwp): Don't modify threaded. (delete_lwp): Don't mention non-threaded mode. (linux_nat_switch_fork): New. (linux_nat_attach): Update inferior_ptid. (linux_nat_wait): Handle num_lwps == 0 at entry. Don't check threaded flag. (linux_nat_kill): Handle pending forks and saved forks. (linux_nat_mourn_inferior): Handle saved forks. (linux_nat_pid_to_str): Don't use the LWP form when there is only one thread. (linux_target): Don't set to_wait, to_kill, or to_mourn_inferior. (linux_nat_add_target): New. (_initialize_linux_nat): Don't initialize the linux native target here. * linux-nat.h (linux_nat_add_target, linux_nat_switch_fork): New prototypes. * linux-fork.c: Include "linux-nat.h". (add_fork): Update initial PID. (fork_load_infrun_state): Call linux_nat_switch_fork. * Makefile.in (linux-fork.o): Update. * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use linux_nat_add_target instead of add_target. * amd64-linux-nat.c (_initialize_amd64_linux_nat): Likewise. * arm-linux-nat.c (_initialize_arm_linux_nat): Likewise. * hppa-linux-nat.c (_initialize_hppa_linux_nat): Likewise. * ia64-linux-nat.c (_initialize_ia64_linux_nat): Likewise. * i386-linux-nat.c (_initialize_i386_linux_nat): Likewise. * m32r-linux-nat.c (_initialize_m32r_linux_nat): Likewise. * m68klinux-nat.c (_initialize_m68k_linux_nat): Likewise. * mips-linux-nat.c (_initialize_mips_linux_nat): Likewise. * ppc-linux-nat.c (_initialize_ppc_linux_nat): Likewise. * s390-nat.c (_initialize_s390_nat): Likewise. * sparc-linux-nat.c (_initialize_sparc_linux_nat): Likewise. * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Likewise.
2006-03-24 * linux-fork.c: Include "gdb_assert.h".Daniel Jacobowitz1-14/+25
(fork_load_infrun_state): Set inferior_ptid and stop_pc here. Update the register cache and selected frame also. (linux_fork_mourn_inferior): Use fork_load_infrun_state. Return to single fork mode if necessary. (linux_fork_context): Remove bits handled by fork_load_infrun_state. * Makefile.in (linux_fork_h): New. (linux-fork.o, linux-nat.o): Update.
2006-03-102006-03-09 Michael Snyder <msnyder@redhat.com>Michael Snyder1-10/+14
* linux-nat.c (kill_inferior): Just call target_mourn_inferior instead of getting tricky for the multi-fork case. * linux-fork.c (linux_fork_killall): Call PT_KILL and waitpid for each fork, and then use init_fork_list to delete them.
2006-01-15 * linux-fork.c (delete_fork_command, detach_fork_command): UseDaniel Jacobowitz1-3/+3
PIDGET.
2006-01-042006-01-04 Michael Snyder <msnyder@redhat.com>Michael Snyder1-0/+689
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.