From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10819 invoked by alias); 20 Oct 2009 06:14:29 -0000 Received: (qmail 10808 invoked by uid 22791); 20 Oct 2009 06:14:25 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS,ZMIde_GENERICSPAM1 X-Spam-Check-By: sourceware.org Received: from mail-px0-f175.google.com (HELO mail-px0-f175.google.com) (209.85.216.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Oct 2009 06:14:19 +0000 Received: by pxi5 with SMTP id 5so2698766pxi.12 for ; Mon, 19 Oct 2009 23:14:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.119.10 with SMTP id r10mr384277wfc.255.1256019258102; Mon, 19 Oct 2009 23:14:18 -0700 (PDT) In-Reply-To: <200910191106.28905.pedro@codesourcery.com> References: <200910191106.28905.pedro@codesourcery.com> From: Hui Zhu Date: Tue, 20 Oct 2009 06:14:00 -0000 Message-ID: Subject: Re: [commit] multi-executable support To: Pedro Alves Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-10/txt/msg00463.txt.bz2 darwin-nat.c if (breakpoint_inserted_here_p (pc)) Hui On Mon, Oct 19, 2009 at 18:06, Pedro Alves wrote: > On Tuesday 13 October 2009 14:40:47, Pedro Alves wrote: >> ... I'll aim at applying this at the end of the week, say. > > Here's the patch that I just committed. > > 2009-10-19 =A0Pedro Alves =A0 > =A0 =A0 =A0 =A0 =A0 =A0Stan Shebs =A0 > > =A0 =A0 =A0 =A0Add base multi-executable/process support to GDB. > > =A0 =A0 =A0 =A0gdb/ > =A0 =A0 =A0 =A0* Makefile.in (SFILES): Add progspace.c. > =A0 =A0 =A0 =A0(COMMON_OBS): Add progspace.o. > =A0 =A0 =A0 =A0* progspace.h: New. > =A0 =A0 =A0 =A0* progspace.c: New. > > =A0 =A0 =A0 =A0* breakpoint.h (struct bp_target_info) : New > =A0 =A0 =A0 =A0field. > =A0 =A0 =A0 =A0(struct bp_location) : New field. > =A0 =A0 =A0 =A0(struct breakpoint) : New field. > =A0 =A0 =A0 =A0(bpstat_stop_status, breakpoint_here_p) > =A0 =A0 =A0 =A0(moribund_breakpoint_here_p, breakpoint_inserted_here_p) > =A0 =A0 =A0 =A0(regular_breakpoint_inserted_here_p) > =A0 =A0 =A0 =A0(software_breakpoint_inserted_here_p, breakpoint_thread_ma= tch) > =A0 =A0 =A0 =A0(set_default_breakpoint): Adjust prototypes. > =A0 =A0 =A0 =A0(remove_breakpoints_pid, breakpoint_program_space_exit): D= eclare. > =A0 =A0 =A0 =A0(insert_single_step_breakpoint, deprecated_insert_raw_brea= kpoint): > =A0 =A0 =A0 =A0Adjust prototypes. > =A0 =A0 =A0 =A0* breakpoint.c (executing_startup): Delete. > =A0 =A0 =A0 =A0(default_breakpoint_sspace): New. > =A0 =A0 =A0 =A0(breakpoint_restore_shadows): Skip if the address space do= esn't > =A0 =A0 =A0 =A0match. > =A0 =A0 =A0 =A0(update_watchpoint): Record the frame's program space in t= he > =A0 =A0 =A0 =A0breakpoint location. > =A0 =A0 =A0 =A0(insert_bp_location): Record the address space in target_i= nfo. > =A0 =A0 =A0 =A0Adjust to pass the symbol space to solib_name_from_address. > =A0 =A0 =A0 =A0(breakpoint_program_space_exit): New. > =A0 =A0 =A0 =A0(insert_breakpoint_locations): Switch the symbol space and= thread > =A0 =A0 =A0 =A0when inserting breakpoints. =A0Don't insert breakpoints in= a vfork > =A0 =A0 =A0 =A0parent waiting for vfork done if we're not attached to the= vfork > =A0 =A0 =A0 =A0child. > =A0 =A0 =A0 =A0(remove_breakpoints_pid): New. > =A0 =A0 =A0 =A0(reattach_breakpoints): Switch to a thread of PID. =A0Igno= re > =A0 =A0 =A0 =A0breakpoints of other symbol spaces. > =A0 =A0 =A0 =A0(create_internal_breakpoint): Store the symbol space in th= e sal. > =A0 =A0 =A0 =A0(create_longjmp_master_breakpoint): Iterate over all symbol > =A0 =A0 =A0 =A0spaces. > =A0 =A0 =A0 =A0(update_breakpoints_after_exec): Ignore breakpoints for ot= her > =A0 =A0 =A0 =A0symbol spaces. > =A0 =A0 =A0 =A0(remove_breakpoint): Rename to ... > =A0 =A0 =A0 =A0(remove_breakpoint_1): ... this. =A0Pass the breakpoints s= ymbol > =A0 =A0 =A0 =A0space to solib_name_from_address. > =A0 =A0 =A0 =A0(remove_breakpoint): New. > =A0 =A0 =A0 =A0(mark_breakpoints_out): Ignore breakpoints from other symb= ol > =A0 =A0 =A0 =A0spaces. > =A0 =A0 =A0 =A0(breakpoint_init_inferior): Ditto. > =A0 =A0 =A0 =A0(breakpoint_here_p): Add an address space argument and adj= ust to > =A0 =A0 =A0 =A0use breakpoint_address_match. > =A0 =A0 =A0 =A0(moribund_breakpoint_here_p): Ditto. > =A0 =A0 =A0 =A0(regular_breakpoint_inserted_here_p): Ditto. > =A0 =A0 =A0 =A0(breakpoint_inserted_here_p): Ditto. > =A0 =A0 =A0 =A0(software_breakpoint_inserted_here_p): Ditto. > =A0 =A0 =A0 =A0(breakpoint_thread_match): Ditto. > =A0 =A0 =A0 =A0(bpstat_check_location): Ditto. > =A0 =A0 =A0 =A0(bpstat_stop_status): Ditto. > =A0 =A0 =A0 =A0(print_breakpoint_location): If there's a location to prin= t, > =A0 =A0 =A0 =A0switch the current symbol space. > =A0 =A0 =A0 =A0(print_one_breakpoint_location): Add `allflag' argument. > =A0 =A0 =A0 =A0(print_one_breakpoint): Ditto. =A0Adjust. > =A0 =A0 =A0 =A0(do_captured_breakpoint_query): Adjust. > =A0 =A0 =A0 =A0(breakpoint_1): Adjust. > =A0 =A0 =A0 =A0(breakpoint_has_pc): Also match the symbol space. > =A0 =A0 =A0 =A0(describe_other_breakpoints): Add a symbol space argument = and > =A0 =A0 =A0 =A0adjust. > =A0 =A0 =A0 =A0(set_default_breakpoint): Add a symbol space argument. =A0= Set > =A0 =A0 =A0 =A0default_breakpoint_sspace. > =A0 =A0 =A0 =A0(breakpoint_address_match): New. > =A0 =A0 =A0 =A0(check_duplicates_for): Add an address space argument, and= adjust. > =A0 =A0 =A0 =A0(set_raw_breakpoint): Record the symbol space in the locat= ion and > =A0 =A0 =A0 =A0in the breakpoint. > =A0 =A0 =A0 =A0(set_longjmp_breakpoint): Skip longjmp master breakpoints = from > =A0 =A0 =A0 =A0other symbol spaces. > =A0 =A0 =A0 =A0(remove_thread_event_breakpoints, remove_solib_event_break= points) > =A0 =A0 =A0 =A0(disable_breakpoints_in_shlibs): Skip breakpoints from oth= er > =A0 =A0 =A0 =A0symbol spaces. > =A0 =A0 =A0 =A0(disable_breakpoints_in_unloaded_shlib): Match symbol spac= es. > =A0 =A0 =A0 =A0(create_catchpoint): Set the symbol space in the sal. > =A0 =A0 =A0 =A0(disable_breakpoints_before_startup): Skip breakpoints fro= m other > =A0 =A0 =A0 =A0symbol spaces. =A0Set executing_startup in the current sym= bol space. > =A0 =A0 =A0 =A0(enable_breakpoints_after_startup): Clear executing_startu= p in the > =A0 =A0 =A0 =A0current symbol space. =A0Skip breakpoints from other symbo= l spaces. > =A0 =A0 =A0 =A0(clone_momentary_breakpoint): Also copy the symbol space. > =A0 =A0 =A0 =A0(add_location_to_breakpoint): Set the location's symbol sp= ace. > =A0 =A0 =A0 =A0(bp_loc_is_permanent): Switch thread and symbol space. > =A0 =A0 =A0 =A0(create_breakpoint): Adjust. > =A0 =A0 =A0 =A0(expand_line_sal_maybe): Expand comment to mention symbol = spaces. > =A0 =A0 =A0 =A0Switch thread and symbol space when reading memory. > =A0 =A0 =A0 =A0(parse_breakpoint_sals): Set the symbol space in the sal. > =A0 =A0 =A0 =A0(break_command_really): Ditto. > =A0 =A0 =A0 =A0(skip_prologue_sal): Switch and space. > =A0 =A0 =A0 =A0(resolve_sal_pc): Ditto. > =A0 =A0 =A0 =A0(watch_command_1): Record the symbol space in the sal. > =A0 =A0 =A0 =A0(create_ada_exception_breakpoint): Adjust. > =A0 =A0 =A0 =A0(clear_command): Adjust. =A0Match symbol spaces. > =A0 =A0 =A0 =A0(update_global_location_list): Use breakpoint_address_matc= h. > =A0 =A0 =A0 =A0(breakpoint_re_set_one): Switch thread and space. > =A0 =A0 =A0 =A0(breakpoint_re_set): Save symbol space. > =A0 =A0 =A0 =A0(breakpoint_re_set_thread): Also reset the symbol space. > =A0 =A0 =A0 =A0(deprecated_insert_raw_breakpoint): Add an address space a= rgument. > =A0 =A0 =A0 =A0Adjust. > =A0 =A0 =A0 =A0(insert_single_step_breakpoint): Ditto. > =A0 =A0 =A0 =A0(single_step_breakpoint_inserted_here_p): Ditto. > =A0 =A0 =A0 =A0(clear_syscall_counts): New. > =A0 =A0 =A0 =A0(_initialize_breakpoint): Install it as inferior_exit obse= rver. > > =A0 =A0 =A0 =A0* exec.h: Include "progspace.h". > =A0 =A0 =A0 =A0(exec_bfd, exec_bfd_mtime): New defines. > =A0 =A0 =A0 =A0(exec_close): Declare. > =A0 =A0 =A0 =A0* exec.c: Include "gdbthread.h" and "progspace.h". > =A0 =A0 =A0 =A0(exec_bfd, exec_bfd_mtime, current_target_sections_1): Del= ete. > =A0 =A0 =A0 =A0(using_exec_ops): New. > =A0 =A0 =A0 =A0(exec_close_1): Rename to exec_close, and make public. > =A0 =A0 =A0 =A0(exec_close): Rename to exec_close_1, and adjust all calle= rs. =A0Add > =A0 =A0 =A0 =A0description. =A0Remove target sections and close executabl= es from > =A0 =A0 =A0 =A0all program spaces. > =A0 =A0 =A0 =A0(exec_file_attach): Add comment. > =A0 =A0 =A0 =A0(add_target_sections): Check on `using_exec_ops' to check = if the > =A0 =A0 =A0 =A0target should be pushed. > =A0 =A0 =A0 =A0(remove_target_sections): Only unpush the target if there = are no > =A0 =A0 =A0 =A0more target sections in any symbol space. > =A0 =A0 =A0 =A0* gdbcore.h: Include "exec.h". > =A0 =A0 =A0 =A0(exec_bfd, exec_bfd_mtime): Remove declarations. > > =A0 =A0 =A0 =A0* frame.h (get_frame_program_space, get_frame_address_spac= e) > =A0 =A0 =A0 =A0(frame_unwind_program_space): Declare. > =A0 =A0 =A0 =A0* frame.c (struct frame_info) : New fields. > =A0 =A0 =A0 =A0(create_sentinel_frame): Add program space argument. =A0Se= t the > =A0 =A0 =A0 =A0pspace and aspace fields of the frame object. > =A0 =A0 =A0 =A0(get_current_frame, create_new_frame): Adjust. > =A0 =A0 =A0 =A0(get_frame_program_space): New. > =A0 =A0 =A0 =A0(frame_unwind_program_space): New. > =A0 =A0 =A0 =A0(get_frame_address_space): New. > =A0 =A0 =A0 =A0* stack.c (print_frame_info): Adjust. > =A0 =A0 =A0 =A0(print_frame): Use the frame's program space. > > =A0 =A0 =A0 =A0* gdbthread.h (any_live_thread_of_process): Declare. > =A0 =A0 =A0 =A0* thread.c (any_live_thread_of_process): New. > =A0 =A0 =A0 =A0(switch_to_thread): Switch the program space as well. > =A0 =A0 =A0 =A0(restore_selected_frame): Don't warn if trying to restore = frame > =A0 =A0 =A0 =A0level 0. > > =A0 =A0 =A0 =A0* inferior.h: Include "progspace.h". > =A0 =A0 =A0 =A0(detach_fork): Declare. > =A0 =A0 =A0 =A0(struct inferior) > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0: New fields. > =A0 =A0 =A0 =A0: Remove field. > =A0 =A0 =A0 =A0: New fields. > =A0 =A0 =A0 =A0(register_inferior_data, register_inferior_data_with_clean= up) > =A0 =A0 =A0 =A0(clear_inferior_data, set_inferior_data, inferior_data): D= eclare. > =A0 =A0 =A0 =A0(exit_inferior, exit_inferior_silent, exit_inferior_num_si= lent) > =A0 =A0 =A0 =A0(inferior_appeared): Declare. > =A0 =A0 =A0 =A0(find_inferior_pid): Typo. > =A0 =A0 =A0 =A0(find_inferior_id, find_inferior_for_program_space): Decla= re. > =A0 =A0 =A0 =A0(set_current_inferior, save_current_inferior, prune_inferi= ors) > =A0 =A0 =A0 =A0(number_of_inferiors): Declare. > =A0 =A0 =A0 =A0(inferior_list): Declare. > =A0 =A0 =A0 =A0* inferior.c: Include "gdbcore.h" and "symfile.h". > =A0 =A0 =A0 =A0(inferior_list): Make public. > =A0 =A0 =A0 =A0(delete_inferior_1): Always delete thread silently. > =A0 =A0 =A0 =A0(find_inferior_id): Make public. > =A0 =A0 =A0 =A0(current_inferior_): New. > =A0 =A0 =A0 =A0(current_inferior): Use it. > =A0 =A0 =A0 =A0(set_current_inferior): New. > =A0 =A0 =A0 =A0(restore_inferior): New. > =A0 =A0 =A0 =A0(save_current_inferior): New. > =A0 =A0 =A0 =A0(free_inferior): Free the per-inferior data. > =A0 =A0 =A0 =A0(add_inferior_silent): Allocate per-inferior data. > =A0 =A0 =A0 =A0Call inferior_appeared. > =A0 =A0 =A0 =A0(delete_threads_of_inferior): New. > =A0 =A0 =A0 =A0(delete_inferior_1): Adjust interface to take an inferior = pointer. > =A0 =A0 =A0 =A0(delete_inferior): Adjust. > =A0 =A0 =A0 =A0(delete_inferior_silent): Adjust. > =A0 =A0 =A0 =A0(exit_inferior_1): New. > =A0 =A0 =A0 =A0(exit_inferior): New. > =A0 =A0 =A0 =A0(exit_inferior_silent): New. > =A0 =A0 =A0 =A0(exit_inferior_num_silent): New. > =A0 =A0 =A0 =A0(detach_inferior): Adjust. > =A0 =A0 =A0 =A0(inferior_appeared): New. > =A0 =A0 =A0 =A0(discard_all_inferiors): Adjust. > =A0 =A0 =A0 =A0(find_inferior_id): Make public. =A0Assert pid is not zero. > =A0 =A0 =A0 =A0(find_inferior_for_program_space): New. > =A0 =A0 =A0 =A0(have_inferiors): Check if we have any inferior with pid n= ot zero. > =A0 =A0 =A0 =A0(have_live_inferiors): Go over all pushed targets looking = for > =A0 =A0 =A0 =A0process_stratum. > =A0 =A0 =A0 =A0(prune_inferiors): New. > =A0 =A0 =A0 =A0(number_of_inferiors): New. > =A0 =A0 =A0 =A0(print_inferior): Add executable column. =A0Print vfork pa= rent/child > =A0 =A0 =A0 =A0relationships. > =A0 =A0 =A0 =A0(inferior_command): Adjust to cope with not running inferi= ors. > =A0 =A0 =A0 =A0(remove_inferior_command): New. > =A0 =A0 =A0 =A0(add_inferior_command): New. > =A0 =A0 =A0 =A0(clone_inferior_command): New. > =A0 =A0 =A0 =A0(struct inferior_data): New. > =A0 =A0 =A0 =A0(struct inferior_data_registration): New. > =A0 =A0 =A0 =A0(struct inferior_data_registry): New. > =A0 =A0 =A0 =A0(inferior_data_registry): New. > =A0 =A0 =A0 =A0(register_inferior_data_with_cleanup): New. > =A0 =A0 =A0 =A0(register_inferior_data): New. > =A0 =A0 =A0 =A0(inferior_alloc_data): New. > =A0 =A0 =A0 =A0(inferior_free_data): New. > =A0 =A0 =A0 =A0(clear_inferior_data): New. > =A0 =A0 =A0 =A0(set_inferior_data): New. > =A0 =A0 =A0 =A0(inferior_data): New. > =A0 =A0 =A0 =A0(initialize_inferiors): New. > =A0 =A0 =A0 =A0(_initialize_inferiors): Register "add-inferior", > =A0 =A0 =A0 =A0"remove-inferior" and "clone-inferior" commands. > > =A0 =A0 =A0 =A0* objfiles.h: Include "progspace.h". > =A0 =A0 =A0 =A0(struct objfile) : New field. > =A0 =A0 =A0 =A0(symfile_objfile, object_files): Don't declare. > =A0 =A0 =A0 =A0(ALL_PSPACE_OBJFILES): New. > =A0 =A0 =A0 =A0(ALL_PSPACE_OBJFILES_SAFE): New. > =A0 =A0 =A0 =A0(ALL_OBJFILES, ALL_OBJFILES_SAFE): Adjust. > =A0 =A0 =A0 =A0(ALL_PSPACE_SYMTABS): New. > =A0 =A0 =A0 =A0(ALL_PRIMARY_SYMTABS): Adjust. > =A0 =A0 =A0 =A0(ALL_PSPACE_PRIMARY_SYMTABS): New. > =A0 =A0 =A0 =A0(ALL_PSYMTABS): Adjust. > =A0 =A0 =A0 =A0(ALL_PSPACE_PSYMTABS): New. > =A0 =A0 =A0 =A0* objfiles.c (object_files, symfile_objfile): Delete. > =A0 =A0 =A0 =A0(struct objfile_sspace_info): New. > =A0 =A0 =A0 =A0(objfiles_pspace_data): New. > =A0 =A0 =A0 =A0(objfiles_pspace_data_cleanup): New. > =A0 =A0 =A0 =A0(get_objfile_pspace_data): New. > =A0 =A0 =A0 =A0(objfiles_changed_p): Delete. > =A0 =A0 =A0 =A0(allocate_objfile): Set the objfile's program space. =A0Ad= just to > =A0 =A0 =A0 =A0reference objfiles_changed_p in pspace data. > =A0 =A0 =A0 =A0(free_objfile): Adjust to reference objfiles_changed_p in = pspace > =A0 =A0 =A0 =A0data. > =A0 =A0 =A0 =A0(objfile_relocate): Ditto. > =A0 =A0 =A0 =A0(update_section_map): Add pspace argument. =A0Adjust to it= erate over > =A0 =A0 =A0 =A0objfiles in the passed in pspace. > =A0 =A0 =A0 =A0(find_pc_section): Delete sections and num_sections static= s. > =A0 =A0 =A0 =A0Adjust to refer to program space's objfiles_changed_p. =A0= Adjust to > =A0 =A0 =A0 =A0refer to sections and num_sections store in the objfile's = pspace > =A0 =A0 =A0 =A0data. > =A0 =A0 =A0 =A0(objfiles_changed): Adjust to reference objfiles_changed_p= in > =A0 =A0 =A0 =A0pspace data. > =A0 =A0 =A0 =A0(_initialize_objfiles): New. > =A0 =A0 =A0 =A0* linespec.c (decode_all_digits, decode_dollar): Set the s= al's > =A0 =A0 =A0 =A0program space. > =A0 =A0 =A0 =A0* source.c (current_source_pspace): New. > =A0 =A0 =A0 =A0(get_current_source_symtab_and_line): Set the sal's progra= m space. > =A0 =A0 =A0 =A0(set_current_source_symtab_and_line): Set current_source_p= space. > =A0 =A0 =A0 =A0(select_source_symtab): Ditto. =A0Use ALL_OBJFILES. > =A0 =A0 =A0 =A0(forget_cached_source_info): Iterate over all program spac= es. > =A0 =A0 =A0 =A0* symfile.c (clear_symtab_users): Adjust. > =A0 =A0 =A0 =A0* symmisc.c (print_symbol_bcache_statistics): Iterate over= all > =A0 =A0 =A0 =A0program spaces. > =A0 =A0 =A0 =A0(print_objfile_statistics): Ditto. > =A0 =A0 =A0 =A0(maintenance_print_msymbols): Ditto. > =A0 =A0 =A0 =A0(maintenance_print_objfiles): Ditto. > =A0 =A0 =A0 =A0(maintenance_info_symtabs): Ditto. > =A0 =A0 =A0 =A0(maintenance_info_psymtabs): Ditto. > =A0 =A0 =A0 =A0* symtab.h (SYMTAB_PSPACE): New. > =A0 =A0 =A0 =A0(struct symtab_and_line) : New field. > =A0 =A0 =A0 =A0* symtab.c (init_sal): Clear the sal's program space. > =A0 =A0 =A0 =A0(find_pc_sect_symtab): Set the sal's program space. =A0Swi= tch thread > =A0 =A0 =A0 =A0and space. > =A0 =A0 =A0 =A0(append_expanded_sal): Add program space argument. =A0Iter= ate over > =A0 =A0 =A0 =A0all program spaces. > =A0 =A0 =A0 =A0(expand_line_sal): Iterate over all program spaces. =A0Swi= tch > =A0 =A0 =A0 =A0program space. > > =A0 =A0 =A0 =A0* target.h (enum target_waitkind) : New. > =A0 =A0 =A0 =A0(struct target_ops) : New field. > =A0 =A0 =A0 =A0(target_thread_address_space): Define. > =A0 =A0 =A0 =A0* target.c (target_detach): Only remove breakpoints from t= he > =A0 =A0 =A0 =A0inferior we're detaching. > =A0 =A0 =A0 =A0(target_thread_address_space): New. > > =A0 =A0 =A0 =A0* defs.h (initialize_progspace): Declare. > =A0 =A0 =A0 =A0* top.c (gdb_init): Call it. > > =A0 =A0 =A0 =A0* solist.h (struct so_list) : New field. > =A0 =A0 =A0 =A0* solib.h (struct program_space): Forward declare. > =A0 =A0 =A0 =A0(solib_name_from_address): Adjust prototype. > =A0 =A0 =A0 =A0* solib.c (so_list_head): Replace with a macro referencing= the > =A0 =A0 =A0 =A0program space. > =A0 =A0 =A0 =A0(update_solib_list): Set the so's program space. > =A0 =A0 =A0 =A0(solib_name_from_address): Add a program space argument an= d adjust. > > =A0 =A0 =A0 =A0* solib-svr4.c (struct svr4_info) : Delete field. > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0: New fields. > =A0 =A0 =A0 =A0(svr4_info_p, svr4_info): Delete. > =A0 =A0 =A0 =A0(solib_svr4_sspace_data): New. > =A0 =A0 =A0 =A0(get_svr4_info): Rewrite. > =A0 =A0 =A0 =A0(svr4_sspace_data_cleanup): New. > =A0 =A0 =A0 =A0(open_symbol_file_object): Adjust. > =A0 =A0 =A0 =A0(svr4_default_sos): Adjust. > =A0 =A0 =A0 =A0(svr4_fetch_objfile_link_map): Adjust. > =A0 =A0 =A0 =A0(interp_text_sect_low, interp_text_sect_high, interp_plt_s= ect_low) > =A0 =A0 =A0 =A0(interp_plt_sect_high): Delete. > =A0 =A0 =A0 =A0(svr4_in_dynsym_resolve_code): Adjust. > =A0 =A0 =A0 =A0(enable_break): Adjust. > =A0 =A0 =A0 =A0(svr4_clear_solib): Revert bit that removed the svr4_info = here, > =A0 =A0 =A0 =A0and reinstate clearing debug_base, debug_loader_offset_p, > =A0 =A0 =A0 =A0debug_loader_offset and debug_loader_name. > =A0 =A0 =A0 =A0(_initialize_svr4_solib): Register solib_svr4_pspace_data.= =A0Don't > =A0 =A0 =A0 =A0install an inferior_exit observer anymore. > > =A0 =A0 =A0 =A0* printcmd.c (struct display) : New field. > =A0 =A0 =A0 =A0(display_command): Set the display's sspace. > =A0 =A0 =A0 =A0(do_one_display): Match the display's sspace. > =A0 =A0 =A0 =A0(display_uses_solib_p): Ditto. > > =A0 =A0 =A0 =A0* linux-fork.c (detach_fork): Moved to infrun.c. > =A0 =A0 =A0 =A0(_initialize_linux_fork): Moved "detach-on-fork" command to > =A0 =A0 =A0 =A0infrun.c. > =A0 =A0 =A0 =A0* infrun.c (detach_fork): Moved from linux-fork.c. > =A0 =A0 =A0 =A0(proceed_after_vfork_done): New. > =A0 =A0 =A0 =A0(handle_vfork_child_exec_or_exit): New. > =A0 =A0 =A0 =A0(follow_exec_mode_replace, follow_exec_mode_keep) > =A0 =A0 =A0 =A0(follow_exec_mode_names, follow_exec_mode_string) > =A0 =A0 =A0 =A0(show_follow_exec_mode_string): New. > =A0 =A0 =A0 =A0(follow_exec): New. =A0Reinstate the mark_breakpoints_out = call. > =A0 =A0 =A0 =A0Remove shared libraries before attaching new executable. = =A0If user > =A0 =A0 =A0 =A0wants to keep the inferior, keep it. > =A0 =A0 =A0 =A0(displaced_step_fixup): Adjust to pass an address space to= the > =A0 =A0 =A0 =A0breakpoints module. > =A0 =A0 =A0 =A0(resume): Ditto. > =A0 =A0 =A0 =A0(clear_proceed_status): In all-stop mode, always clear the= proceed > =A0 =A0 =A0 =A0status of all threads. > =A0 =A0 =A0 =A0(prepare_to_proceed): Adjust to pass an address space to t= he > =A0 =A0 =A0 =A0breakpoints module. > =A0 =A0 =A0 =A0(proceed): Ditto. > =A0 =A0 =A0 =A0(adjust_pc_after_break): Ditto. > =A0 =A0 =A0 =A0(handle_inferior_event): When handling a process exit, swi= tch the > =A0 =A0 =A0 =A0program space to the inferior's that had exited. =A0Call > =A0 =A0 =A0 =A0handle_vfork_child_exec_or_exit. =A0Adjust to pass an addr= ess space > =A0 =A0 =A0 =A0to the breakpoints module. =A0In non-stop mode, when follo= wing a > =A0 =A0 =A0 =A0fork and detach-fork is off, also resume the other branch.= =A0Handle > =A0 =A0 =A0 =A0TARGET_WAITKIND_VFORK_DONE. =A0Set the program space in sa= ls. > =A0 =A0 =A0 =A0(normal_stop): Prune inferiors. > =A0 =A0 =A0 =A0(_initialize_infrun): Install the new "follow-exec-mode" c= ommand. > =A0 =A0 =A0 =A0"detach-on-fork" moved here. > > =A0 =A0 =A0 =A0* regcache.h (get_regcache_aspace): Declare. > =A0 =A0 =A0 =A0* regcache.c (struct regcache) : New field. > =A0 =A0 =A0 =A0(regcache_xmalloc): Clear the aspace. > =A0 =A0 =A0 =A0(get_regcache_aspace): New. > =A0 =A0 =A0 =A0(regcache_cpy): Copy the aspace field. > =A0 =A0 =A0 =A0(regcache_cpy_no_passthrough): Ditto. > =A0 =A0 =A0 =A0(get_thread_regcache): Fetch the thread's address space fr= om the > =A0 =A0 =A0 =A0target, and store it in the regcache. > > =A0 =A0 =A0 =A0* infcall.c (call_function_by_hand): Set the sal's pspace. > > =A0 =A0 =A0 =A0* arch-utils.c (default_has_shared_address_space): New. > =A0 =A0 =A0 =A0* arch-utils.h (default_has_shared_address_space): Declare. > > =A0 =A0 =A0 =A0* gdbarch.sh (has_shared_address_space): New. > =A0 =A0 =A0 =A0* gdbarch.h, gdbarch.c: Regenerate. > > =A0 =A0 =A0 =A0* linux-tdep.c: Include auxv.h, target.h, elf/common.h. > =A0 =A0 =A0 =A0(linux_has_shared_address_space): New. > =A0 =A0 =A0 =A0(_initialize_linux_tdep): Declare. > > =A0 =A0 =A0 =A0* arm-tdep.c (arm_software_single_step): Pass the frame's = address > =A0 =A0 =A0 =A0space to insert_single_step_breakpoint. > =A0 =A0 =A0 =A0* arm-linux-tdep.c (arm_linux_software_single_step): Pass = the > =A0 =A0 =A0 =A0frame's pspace to breakpoint functions. > =A0 =A0 =A0 =A0* cris-tdep.c (crisv32_single_step_through_delay): Ditto. > =A0 =A0 =A0 =A0(cris_software_single_step): Ditto. > =A0 =A0 =A0 =A0* mips-tdep.c (deal_with_atomic_sequence): Add frame argum= ent. > =A0 =A0 =A0 =A0Pass the frame's pspace to breakpoint functions. > =A0 =A0 =A0 =A0(mips_software_single_step): Adjust. > =A0 =A0 =A0 =A0(mips_single_step_through_delay): Adjust. > =A0 =A0 =A0 =A0* rs6000-aix-tdep.c (rs6000_software_single_step): Adjust. > =A0 =A0 =A0 =A0* rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust. > =A0 =A0 =A0 =A0* solib-irix.c (enable_break): Adjust to pass the current = frame's > =A0 =A0 =A0 =A0address space to breakpoint functions. > =A0 =A0 =A0 =A0* sparc-tdep.c (sparc_software_single_step): Ditto. > =A0 =A0 =A0 =A0* spu-tdep.c (spu_software_single_step): Ditto. > =A0 =A0 =A0 =A0* alpha-tdep.c (alpha_software_single_step): Ditto. > =A0 =A0 =A0 =A0* record.c (record_wait): Adjust to pass an address space = to the > =A0 =A0 =A0 =A0breakpoints module. > > =A0 =A0 =A0 =A0* fork-child.c (fork_inferior): Set the new inferior's pro= gram and > =A0 =A0 =A0 =A0address spaces. > =A0 =A0 =A0 =A0* inf-ptrace.c (inf_ptrace_follow_fork): Copy the parent's= program > =A0 =A0 =A0 =A0and address spaces. > =A0 =A0 =A0 =A0(inf_ptrace_attach): Set the inferior's program and addres= s spaces. > =A0 =A0 =A0 =A0* linux-nat.c: Include "solib.h". > =A0 =A0 =A0 =A0(linux_child_follow_fork): Manage parent and child's progr= am and > =A0 =A0 =A0 =A0address spaces. =A0Clone the parent's program space if nec= essary. > =A0 =A0 =A0 =A0Don't wait for the vfork to be done here. =A0Refuse to res= ume if > =A0 =A0 =A0 =A0following the vfork parent while leaving the child stopped. > =A0 =A0 =A0 =A0(resume_callback): Don't resume a vfork parent. > =A0 =A0 =A0 =A0(linux_nat_resume): Also check for pending events in the > =A0 =A0 =A0 =A0lp->waitstatus field. > =A0 =A0 =A0 =A0(linux_handle_extended_wait): Report TARGET_WAITKIND_VFORK= _DONE > =A0 =A0 =A0 =A0events to the core. > =A0 =A0 =A0 =A0(stop_wait_callback): Don't wait for SIGSTOP on vfork pare= nts. > =A0 =A0 =A0 =A0(cancel_breakpoint): Adjust. > =A0 =A0 =A0 =A0* linux-thread-db.c (thread_db_wait): Don't remove thread = event > =A0 =A0 =A0 =A0breakpoints here. > =A0 =A0 =A0 =A0(thread_db_mourn_inferior): Don't mark breakpoints out her= e. > =A0 =A0 =A0 =A0Remove thread event breakpoints after mourning. > =A0 =A0 =A0 =A0* corelow.c: Include progspace.h. > =A0 =A0 =A0 =A0(core_open): Set the inferior's program and address spaces. > =A0 =A0 =A0 =A0* remote.c (remote_add_inferior): Set the new inferior's p= rogram > =A0 =A0 =A0 =A0and address spaces. > =A0 =A0 =A0 =A0(remote_start_remote): Update address spaces. > =A0 =A0 =A0 =A0(extended_remote_create_inferior_1): Don't init the thread= list if > =A0 =A0 =A0 =A0we already debugging other inferiors. > =A0 =A0 =A0 =A0* darwin-nat.c (darwin_attach): Set the new inferior's pro= gram and > =A0 =A0 =A0 =A0address spaces. > =A0 =A0 =A0 =A0* gnu-nat.c (gnu_attach): Ditto. > =A0 =A0 =A0 =A0* go32-nat.c (go32_create_inferior): Ditto. > =A0 =A0 =A0 =A0* inf-ttrace.c (inf_ttrace_follow_fork, inf_ttrace_attach)= : Ditto. > =A0 =A0 =A0 =A0* monitor.c (monitor_open): Ditto. > =A0 =A0 =A0 =A0* nto-procfs.c (procfs_attach, procfs_create_inferior): Di= tto. > =A0 =A0 =A0 =A0* procfs.c (do_attach): Ditto. > =A0 =A0 =A0 =A0* windows-nat.c (do_initial_windows_stuff): Ditto. > > =A0 =A0 =A0 =A0* inflow.c (inferior_process_group) > =A0 =A0 =A0 =A0(terminal_init_inferior_with_pgrp, terminal_inferior, > =A0 =A0 =A0 =A0(terminal_ours_1, inflow_inferior_exit, copy_terminal_info) > =A0 =A0 =A0 =A0(child_terminal_info, new_tty_postfork, set_sigint_trap): = Adjust > =A0 =A0 =A0 =A0to use per-inferior data instead of inferior->terminal_inf= o. > =A0 =A0 =A0 =A0(inflow_inferior_data): New. > =A0 =A0 =A0 =A0(inflow_new_inferior): Delete. > =A0 =A0 =A0 =A0(inflow_inferior_data_cleanup): New. > =A0 =A0 =A0 =A0(get_inflow_inferior_data): New. > > =A0 =A0 =A0 =A0* mi/mi-interp.c (mi_new_inferior): Rename to... > =A0 =A0 =A0 =A0(mi_inferior_appeared): ... this. > =A0 =A0 =A0 =A0(mi_interpreter_init): Adjust. > > =A0 =A0 =A0 =A0* tui/tui-disasm.c: Include "progspace.h". > =A0 =A0 =A0 =A0(tui_set_disassem_content): Pass an address space to > =A0 =A0 =A0 =A0breakpoint_here_p. > > =A0 =A0 =A0 =A0* NEWS: Mention multi-program debugging support. =A0Mentio= n new > =A0 =A0 =A0 =A0commands "add-inferior", "clone-inferior", "remove-inferio= r", > =A0 =A0 =A0 =A0"maint info program-spaces", and new option "set > =A0 =A0 =A0 =A0follow-exec-mode". > > 2009-10-19 =A0Pedro Alves =A0 > =A0 =A0 =A0 =A0 =A0 =A0Stan Shebs =A0 > > =A0 =A0 =A0 =A0gdb/doc/ > =A0 =A0 =A0 =A0* observer.texi (new_inferior): Rename to... > =A0 =A0 =A0 =A0(inferior_appeared): ... this. > > 2009-10-19 =A0Pedro Alves =A0 > =A0 =A0 =A0 =A0 =A0 =A0Stan Shebs =A0 > > =A0 =A0 =A0 =A0gdb/testsuite/ > =A0 =A0 =A0 =A0* gdb.base/foll-vfork.exp: Adjust to spell out "follow-for= k". > =A0 =A0 =A0 =A0* gdb.base/foll-exec.exp: Adjust to expect a process id be= fore > =A0 =A0 =A0 =A0"Executing new program". > =A0 =A0 =A0 =A0* gdb.base/foll-fork.exp: Adjust to spell out "follow-fork= ". > =A0 =A0 =A0 =A0* gdb.base/multi-forks.exp: Ditto. =A0Adjust to the inferi= or being > =A0 =A0 =A0 =A0left listed after having been killed. > =A0 =A0 =A0 =A0* gdb.base/attach.exp: Adjust to spell out "symbol-file". > =A0 =A0 =A0 =A0* gdb.base/maint.exp: Adjust test. > > =A0 =A0 =A0 =A0* Makefile.in (ALL_SUBDIRS): Add gdb.multi. > =A0 =A0 =A0 =A0* gdb.multi/Makefile.in: New. > =A0 =A0 =A0 =A0* gdb.multi/base.exp: New. > =A0 =A0 =A0 =A0* gdb.multi/goodbye.c: New. > =A0 =A0 =A0 =A0* gdb.multi/hangout.c: New. > =A0 =A0 =A0 =A0* gdb.multi/hello.c: New. > =A0 =A0 =A0 =A0* gdb.multi/bkpt-multi-exec.c: New. > =A0 =A0 =A0 =A0* gdb.multi/bkpt-multi-exec.exp: New. > =A0 =A0 =A0 =A0* gdb.multi/crashme.c: New. > > 2009-10-19 =A0Pedro Alves =A0 > =A0 =A0 =A0 =A0 =A0 =A0Stan Shebs =A0 > > =A0 =A0 =A0 =A0gdb/doc/ > =A0 =A0 =A0 =A0* gdb.texinfo (Inferiors): Rename node to ... > =A0 =A0 =A0 =A0(Inferiors and Programs): ... this. =A0Mention running mul= tiple > =A0 =A0 =A0 =A0programs in the same debug session. > =A0 =A0 =A0 =A0: Mention the new 'Executable' column if "= info > =A0 =A0 =A0 =A0inferiors". =A0Update examples. =A0Document the "add-infer= ior", > =A0 =A0 =A0 =A0"clone-inferior", "remove-inferior" and "maint info > =A0 =A0 =A0 =A0program-spaces" commands. > =A0 =A0 =A0 =A0(Process): Rename node to... > =A0 =A0 =A0 =A0(Forks): ... this. =A0Document "set|show follow-exec-mode". > > -- > Pedro Alves >