From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1976 invoked by alias); 13 Jan 2014 19:13:20 -0000 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 Received: (qmail 1865 invoked by uid 89); 13 Jan 2014 19:13:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 13 Jan 2014 19:13:18 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0DJDHdE007194 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 Jan 2014 14:13:17 -0500 Received: from barimba.redhat.com (ovpn-113-85.phx2.redhat.com [10.3.113.85]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s0DJCptc016701; Mon, 13 Jan 2014 14:13:16 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFC 32/32] minor cleanups to update_current_target Date: Mon, 13 Jan 2014 19:13:00 -0000 Message-Id: <1389640367-5571-33-git-send-email-tromey@redhat.com> In-Reply-To: <1389640367-5571-1-git-send-email-tromey@redhat.com> References: <1389640367-5571-1-git-send-email-tromey@redhat.com> X-SW-Source: 2014-01/txt/msg00341.txt.bz2 During the conversion I kept all the "do not inherit" comments in update_current_target. However, now they are not needed. This patch updates the comments for INHERIT and de_fault, and removes the somewhat odd INHERIT of to_stratum. 2014-01-13 Tom Tromey * target.c (update_current_target): Update comments. Do not INHERIT to_stratum. --- gdb/ChangeLog | 5 +++ gdb/target.c | 128 +++------------------------------------------------------- 2 files changed, 11 insertions(+), 122 deletions(-) diff --git a/gdb/target.c b/gdb/target.c index 76316b5..a503220 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -590,147 +590,31 @@ update_current_target (void) /* Install the delegators. */ install_delegators (¤t_target); + current_target.to_stratum = target_stack->to_stratum; + #define INHERIT(FIELD, TARGET) \ if (!current_target.FIELD) \ current_target.FIELD = (TARGET)->FIELD + /* Do not add any new INHERITs here. Instead, use the delegation + mechanism provided by make-target-delegates. */ for (t = target_stack; t; t = t->beneath) { INHERIT (to_shortname, t); INHERIT (to_longname, t); INHERIT (to_doc, t); - /* Do not inherit to_open. */ - /* Do not inherit to_close. */ - /* Do not inherit to_attach. */ - /* Do not inherit to_post_attach. */ INHERIT (to_attach_no_wait, t); - /* Do not inherit to_detach. */ - /* Do not inherit to_disconnect. */ - /* Do not inherit to_resume. */ - /* Do not inherit to_wait. */ - /* Do not inherit to_fetch_registers. */ - /* Do not inherit to_store_registers. */ - /* Do not inherit to_prepare_to_store. */ INHERIT (deprecated_xfer_memory, t); - /* Do not inherit to_files_info. */ - /* Do not inherit to_insert_breakpoint. */ - /* Do not inherit to_remove_breakpoint. */ - /* Do not inherit to_can_use_hw_breakpoint. */ - /* Do not inherit to_insert_hw_breakpoint. */ - /* Do not inherit to_remove_hw_breakpoint. */ - /* Do not inherit to_ranged_break_num_registers. */ - /* Do not inherit to_insert_watchpoint. */ - /* Do not inherit to_remove_watchpoint. */ - /* Do not inherit to_insert_mask_watchpoint. */ - /* Do not inherit to_remove_mask_watchpoint. */ - /* Do not inherit to_stopped_data_address. */ INHERIT (to_have_steppable_watchpoint, t); INHERIT (to_have_continuable_watchpoint, t); - /* Do not inherit to_stopped_by_watchpoint. */ - /* Do not inherit to_watchpoint_addr_within_range. */ - /* Do not inherit to_region_ok_for_hw_watchpoint. */ - /* Do not inherit to_can_accel_watchpoint_condition. */ - /* Do not inherit to_masked_watch_num_registers. */ - /* Do not inherit to_terminal_init. */ - /* Do not inherit to_terminal_inferior. */ - /* Do not inherit to_terminal_ours_for_output. */ - /* Do not inherit to_terminal_ours. */ - /* Do not inherit to_terminal_save_ours. */ - /* Do not inherit to_terminal_info. */ - /* Do not inherit to_kill. */ - /* Do not inherit to_load. */ - /* Do no inherit to_create_inferior. */ - /* Do not inherit to_post_startup_inferior. */ - /* Do not inherit to_insert_fork_catchpoint. */ - /* Do not inherit to_remove_fork_catchpoint. */ - /* Do not inherit to_insert_vfork_catchpoint. */ - /* Do not inherit to_remove_vfork_catchpoint. */ - /* Do not inherit to_follow_fork. */ - /* Do not inherit to_insert_exec_catchpoint. */ - /* Do not inherit to_remove_exec_catchpoint. */ - /* Do not inherit to_set_syscall_catchpoint. */ - /* Do not inherit to_has_exited. */ - /* Do not inherit to_mourn_inferior. */ - /* Do not inherit to_can_run. */ - /* Do not inherit to_pass_signals. */ - /* Do not inherit to_program_signals. */ - /* Do not inherit to_thread_alive. */ - /* Do not inherit to_find_new_threads. */ - /* Do not inherit to_pid_to_str. */ - /* Do not inherit to_extra_thread_info. */ - /* Do not inherit to_thread_name. */ - /* Do not inherit to_stop. */ - /* Do not inherit to_xfer_partial. */ - /* Do not inherit to_rcmd. */ - /* Do not inherit to_pid_to_exec_file. */ - /* Do not inherit to_log_command. */ - INHERIT (to_stratum, t); - /* Do not inherit to_has_all_memory. */ - /* Do not inherit to_has_memory. */ - /* Do not inherit to_has_stack. */ - /* Do not inherit to_has_registers. */ - /* Do not inherit to_has_execution. */ INHERIT (to_has_thread_control, t); - /* Do not inherit to_can_async_p. */ - /* Do not inherit to_is_async_p. */ - /* Do not inherit to_async. */ - /* Do not inherit to_find_memory_regions. */ - /* Do not inherit to_make_corefile_notes. */ - /* Do not inherit to_get_bookmark. */ - /* Do not inherit to_goto_bookmark. */ - /* Do not inherit to_get_thread_local_address. */ - /* Do not inherit to_can_execute_reverse. */ - /* Do not inherit to_execution_direction. */ - /* Do not inherit to_thread_architecture. */ - /* Do not inherit to_read_description. */ - /* Do not inherit to_get_ada_task_ptid. */ - /* Do not inherit to_search_memory. */ - /* Do not inherit to_supports_multi_process. */ - /* Do not inherit to_supports_enable_disable_tracepoint. */ - /* Do not inherit to_supports_string_tracing. */ - /* Do not inherit to_trace_init. */ - /* Do not inherit to_download_tracepoint. */ - /* Do not inherit to_can_download_tracepoint. */ - /* Do not inherit to_download_trace_state_variable. */ - /* Do not inherit to_enable_tracepoint. */ - /* Do not inherit to_disable_tracepoint. */ - /* Do not inherit to_trace_set_readonly_regions. */ - /* Do not inherit to_trace_start. */ - /* Do not inherit to_get_trace_status. */ - /* Do not inherit to_get_tracepoint_status. */ - /* Do not inherit to_trace_stop. */ - /* Do not inherit to_trace_find. */ - /* Do not inherit to_get_trace_state_variable_value. */ - /* Do not inherit to_save_trace_data. */ - /* Do not inherit to_upload_tracepoints. */ - /* Do not inherit to_upload_trace_state_variables. */ - /* Do not inherit to_get_raw_trace_data. */ - /* Do not inherit to_get_min_fast_tracepoint_insn_len. */ - /* Do not inherit to_set_disconnected_tracing. */ - /* Do not inherit to_set_circular_trace_buffer. */ - /* Do not inherit to_set_trace_buffer_size. */ - /* Do not inherit to_set_trace_notes. */ - /* Do not inherit to_get_tib_address. */ - /* Do not inherit to_set_permissions. */ - /* Do not inherit to_static_tracepoint_marker_at. */ - /* Do not inherit to_static_tracepoint_markers_by_strid. */ - /* Do not inherit to_traceframe_info. */ - /* Do not inherit to_use_agent. */ - /* Do not inherit to_can_use_agent. */ - /* Do not inherit to_augmented_libraries_svr4_read. */ INHERIT (to_magic, t); - /* Do not inherit - to_supports_evaluation_of_breakpoint_conditions. */ - /* Do not inherit to_can_run_breakpoint_commands. */ - /* Do not inherit to_memory_map. */ - /* Do not inherit to_flash_erase. */ - /* Do not inherit to_flash_done. */ } #undef INHERIT /* Clean up a target struct so it no longer has any zero pointers in - it. Some entries are defaulted to a method that print an error, - others are hard-wired to a standard recursive default. */ + it. Do not add any new de_faults here. Instead, use the + delegation mechanism provided by make-target-delegates. */ #define de_fault(field, value) \ if (!current_target.field) \ -- 1.8.1.4