From patchwork Thu Oct 20 16:28:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Rudo X-Patchwork-Id: 16696 Received: (qmail 67816 invoked by alias); 20 Oct 2016 16:28:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 67786 invoked by uid 89); 20 Oct 2016 16:28:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, RCVD_IN_SEMBACKSCATTER autolearn=no version=3.3.2 spammy=frameless, (unknown), 762, 6, 1006 X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 20 Oct 2016 16:28:04 +0000 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u9KGOBL7058737 for ; Thu, 20 Oct 2016 12:28:03 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 266x3wdayb-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 20 Oct 2016 12:28:02 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 20 Oct 2016 17:28:01 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 20 Oct 2016 17:27:59 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id AD12717D8056 for ; Thu, 20 Oct 2016 17:30:10 +0100 (BST) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u9KGRwdJ27459682 for ; Thu, 20 Oct 2016 16:27:58 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u9KGRwBg021698 for ; Thu, 20 Oct 2016 10:27:58 -0600 Received: from ThinkPad.boeblingen.de.ibm.com (dyn-9-152-212-68.boeblingen.de.ibm.com [9.152.212.68]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u9KGRvpJ021658 (version=TLSv1/SSLv3 cipher=AES256-SHA256 bits=256 verify=NO); Thu, 20 Oct 2016 10:27:57 -0600 From: Philipp Rudo To: gdb-patches@sourceware.org Cc: arnez@linux.vnet.ibm.com Subject: [PATCH] Delete target_so_ops->special_symbol_handling hook Date: Thu, 20 Oct 2016 18:28:15 +0200 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16102016-0028-0000-0000-00000234C435 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16102016-0029-0000-0000-000020E27F0B Message-Id: <1476980895-32217-1-git-send-email-prudo@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-10-20_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=3 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1610200294 X-IsSubscribed: yes No one(!) actually implements this hook. So simply delete it. gdb/ChangeLog * solist.h (struct target_so_ops): Delete special_symbol_handling hook. * solib.c (solib_add, reload_shared_libraries): Adjust. * solib-aix.c (solib_aix_special_symbol_handling): Delete (_initialize_solib_aix): Adjust * solib-darwin.c (darwin_special_symbol_handling): Delete (_initialize_darwin_solib): Adjust * solib-dsbt.c (dsbt_special_symbol_handling): Delete (_initialize_dsbt_solib): Adjust * solib-frv.c (frv_special_symbol_handling): Delete (_initialize_frv_solib): Adjust * solib-svr4.c (svr4_special_symbol_handling): Delete (_initialize_svr4_solib): Adjust * solib-target.c (solib_target_special_symbol_handling): Delete (_initialize_solib_target): Adjust --- gdb/solib-aix.c | 10 ---------- gdb/solib-darwin.c | 9 --------- gdb/solib-dsbt.c | 10 ---------- gdb/solib-frv.c | 9 --------- gdb/solib-svr4.c | 9 --------- gdb/solib-target.c | 8 -------- gdb/solib.c | 6 ------ gdb/solist.h | 6 ------ 8 files changed, 67 deletions(-) diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c index 9daf7e1..75634df 100644 --- a/gdb/solib-aix.c +++ b/gdb/solib-aix.c @@ -548,14 +548,6 @@ solib_aix_solib_create_inferior_hook (int from_tty) } } -/* Implement the "special_symbol_handling" target_so_ops method. */ - -static void -solib_aix_special_symbol_handling (void) -{ - /* Nothing needed. */ -} - /* Implement the "current_sos" target_so_ops method. */ static struct so_list * @@ -832,8 +824,6 @@ _initialize_solib_aix (void) solib_aix_so_ops.clear_solib = solib_aix_clear_solib; solib_aix_so_ops.solib_create_inferior_hook = solib_aix_solib_create_inferior_hook; - solib_aix_so_ops.special_symbol_handling - = solib_aix_special_symbol_handling; solib_aix_so_ops.current_sos = solib_aix_current_sos; solib_aix_so_ops.open_symbol_file_object = solib_aix_open_symbol_file_object; diff --git a/gdb/solib-darwin.c b/gdb/solib-darwin.c index cd5dc8d..24cf848 100644 --- a/gdb/solib-darwin.c +++ b/gdb/solib-darwin.c @@ -423,14 +423,6 @@ darwin_in_dynsym_resolve_code (CORE_ADDR pc) return 0; } - -/* No special symbol handling. */ - -static void -darwin_special_symbol_handling (void) -{ -} - /* A wrapper for bfd_mach_o_fat_extract that handles reference counting properly. This will either return NULL, or return a new reference to a BFD. */ @@ -693,7 +685,6 @@ _initialize_darwin_solib (void) darwin_so_ops.free_so = darwin_free_so; darwin_so_ops.clear_solib = darwin_clear_solib; darwin_so_ops.solib_create_inferior_hook = darwin_solib_create_inferior_hook; - darwin_so_ops.special_symbol_handling = darwin_special_symbol_handling; darwin_so_ops.current_sos = darwin_current_sos; darwin_so_ops.open_symbol_file_object = open_symbol_file_object; darwin_so_ops.in_dynsym_resolve_code = darwin_in_dynsym_resolve_code; diff --git a/gdb/solib-dsbt.c b/gdb/solib-dsbt.c index ad79af0..d66fe5d 100644 --- a/gdb/solib-dsbt.c +++ b/gdb/solib-dsbt.c @@ -917,15 +917,6 @@ enable_break (void) return 0; } -/* Once the symbols from a shared object have been loaded in the usual - way, we are called to do any system specific symbol handling that - is needed. */ - -static void -dsbt_special_symbol_handling (void) -{ -} - static void dsbt_relocate_main_executable (void) { @@ -1074,7 +1065,6 @@ _initialize_dsbt_solib (void) dsbt_so_ops.free_so = dsbt_free_so; dsbt_so_ops.clear_solib = dsbt_clear_solib; dsbt_so_ops.solib_create_inferior_hook = dsbt_solib_create_inferior_hook; - dsbt_so_ops.special_symbol_handling = dsbt_special_symbol_handling; dsbt_so_ops.current_sos = dsbt_current_sos; dsbt_so_ops.open_symbol_file_object = open_symbol_file_object; dsbt_so_ops.in_dynsym_resolve_code = dsbt_in_dynsym_resolve_code; diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c index 56ccb88..61a4ed0 100644 --- a/gdb/solib-frv.c +++ b/gdb/solib-frv.c @@ -762,14 +762,6 @@ enable_break (void) return 1; } -/* Implement the "special_symbol_handling" target_so_ops method. */ - -static void -frv_special_symbol_handling (void) -{ - /* Nothing needed for FRV. */ -} - static void frv_relocate_main_executable (void) { @@ -1175,7 +1167,6 @@ _initialize_frv_solib (void) frv_so_ops.free_so = frv_free_so; frv_so_ops.clear_solib = frv_clear_solib; frv_so_ops.solib_create_inferior_hook = frv_solib_create_inferior_hook; - frv_so_ops.special_symbol_handling = frv_special_symbol_handling; frv_so_ops.current_sos = frv_current_sos; frv_so_ops.open_symbol_file_object = open_symbol_file_object; frv_so_ops.in_dynsym_resolve_code = frv_in_dynsym_resolve_code; diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index fe36d45..258d7dc 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -2552,14 +2552,6 @@ enable_break (struct svr4_info *info, int from_tty) return 0; } -/* Implement the "special_symbol_handling" target_so_ops method. */ - -static void -svr4_special_symbol_handling (void) -{ - /* Nothing to do. */ -} - /* Read the ELF program headers from ABFD. Return the contents and set *PHDRS_SIZE to the size of the program headers. */ @@ -3327,7 +3319,6 @@ _initialize_svr4_solib (void) svr4_so_ops.clear_so = svr4_clear_so; svr4_so_ops.clear_solib = svr4_clear_solib; svr4_so_ops.solib_create_inferior_hook = svr4_solib_create_inferior_hook; - svr4_so_ops.special_symbol_handling = svr4_special_symbol_handling; svr4_so_ops.current_sos = svr4_current_sos; svr4_so_ops.open_symbol_file_object = open_symbol_file_object; svr4_so_ops.in_dynsym_resolve_code = svr4_in_dynsym_resolve_code; diff --git a/gdb/solib-target.c b/gdb/solib-target.c index e635044..fdb7b65 100644 --- a/gdb/solib-target.c +++ b/gdb/solib-target.c @@ -310,12 +310,6 @@ solib_target_current_sos (void) } static void -solib_target_special_symbol_handling (void) -{ - /* Nothing needed. */ -} - -static void solib_target_solib_create_inferior_hook (int from_tty) { /* Nothing needed. */ @@ -503,8 +497,6 @@ _initialize_solib_target (void) solib_target_so_ops.clear_solib = solib_target_clear_solib; solib_target_so_ops.solib_create_inferior_hook = solib_target_solib_create_inferior_hook; - solib_target_so_ops.special_symbol_handling - = solib_target_special_symbol_handling; solib_target_so_ops.current_sos = solib_target_current_sos; solib_target_so_ops.open_symbol_file_object = solib_target_open_symbol_file_object; diff --git a/gdb/solib.c b/gdb/solib.c index 2235505..b8c2b42 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -1038,13 +1038,9 @@ solib_add (const char *pattern, int from_tty, if (loaded_any_symbols) { - const struct target_so_ops *ops = solib_ops (target_gdbarch ()); - /* Getting new symbols may change our opinion about what is frameless. */ reinit_frame_cache (); - - ops->special_symbol_handling (); } } } @@ -1468,8 +1464,6 @@ reload_shared_libraries (char *ignored, int from_tty, structures that are now freed. Also, getting new symbols may change our opinion about what is frameless. */ reinit_frame_cache (); - - ops->special_symbol_handling (); } /* Wrapper for reload_shared_libraries that replaces "remote:" diff --git a/gdb/solist.h b/gdb/solist.h index 1bdfbaf..f709483 100644 --- a/gdb/solist.h +++ b/gdb/solist.h @@ -100,12 +100,6 @@ struct target_so_ops /* Target dependent code to run after child process fork. */ void (*solib_create_inferior_hook) (int from_tty); - /* Do additional symbol handling, lookup, etc. after symbols for a - shared object have been loaded in the usual way. This is - called to do any system specific symbol handling that might be - needed. */ - void (*special_symbol_handling) (void); - /* Construct a list of the currently loaded shared objects. This list does not include an entry for the main executable file.