From 4db41a0a1097860d1e0d3b8ecf6c01dbbb65ba5a Mon Sep 17 00:00:00 2001 From: Philipp Rudo Date: Fri, 21 Oct 2016 12:32:52 +0200 Subject: [PATCH] Delete target_so_ops->special_symbol_handling hook 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/ChangeLog | 18 ++++++++++++++++++ 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 ------ 9 files changed, 18 insertions(+), 67 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ab3f5d496c7..a8ab8b03c74 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,21 @@ +2016-10-21 Philipp Rudo + + * 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 + 2016-10-20 Yao Qi * configure.tgt: Don't configure if target is *-*-vxworks*. diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c index 9daf7e1f82b..75634df738d 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 cd5dc8dc9f1..24cf848e074 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 ad79af06225..d66fe5d805b 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 56ccb88f93d..61a4ed06363 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 fe36d458346..258d7dc49ea 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 e6350446ec1..fdb7b65f6d7 100644 --- a/gdb/solib-target.c +++ b/gdb/solib-target.c @@ -309,12 +309,6 @@ solib_target_current_sos (void) return start; } -static void -solib_target_special_symbol_handling (void) -{ - /* Nothing needed. */ -} - static void solib_target_solib_create_inferior_hook (int from_tty) { @@ -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 22355058b3e..b8c2b4243ae 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 1bdfbaf81c3..f7094832de9 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. -- 2.30.2