From 8ddf46454aa981246f9611b1897f41fabd2a108d Mon Sep 17 00:00:00 2001 From: Aaron Merey Date: Tue, 10 Aug 2021 22:05:44 -0400 Subject: gdb/solib: Refactor scan_dyntag scan_dyntag is unnecessarily duplicated in solib-svr4.c and solib-dsbt.c. Move this function to solib.c and rename it to gdb_bfd_scan_elf_dyntag. Also add it to solib.h so it is included in both solib-svr4 and solib-dsbt. --- gdb/solib.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gdb/solib.h') diff --git a/gdb/solib.h b/gdb/solib.h index a94e9d3..c50f74e 100644 --- a/gdb/solib.h +++ b/gdb/solib.h @@ -112,6 +112,12 @@ extern CORE_ADDR gdb_bfd_lookup_symbol_from_symtab (bfd *abfd, const void *), const void *data); +/* Scan for DESIRED_DYNTAG in .dynamic section of ABFD. If DESIRED_DYNTAG is + found, 1 is returned and the corresponding PTR and PTR_ADDR are set. */ + +extern int gdb_bfd_scan_elf_dyntag (const int desired_dyntag, bfd *abfd, + CORE_ADDR *ptr, CORE_ADDR *ptr_addr); + /* Enable or disable optional solib event breakpoints as appropriate. */ extern void update_solib_breakpoints (void); -- cgit v1.1