[PATCHv2,1/2] gdb: make core_target_open static

Message ID fa7ef41c24d5602d65434a16204932f7567d8572.1732544034.git.aburgess@redhat.com
State New
Headers
Series Fix regression passing core files on GDB command line |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Test passed

Commit Message

Andrew Burgess Nov. 25, 2024, 2:16 p.m. UTC
  The core_target_open function is only used in corelow.c, so lets make
it static.

There should be no user visible changes after this commit.
---
 gdb/corelow.c | 8 ++++++--
 gdb/gdbcore.h | 4 ----
 2 files changed, 6 insertions(+), 6 deletions(-)
  

Patch

diff --git a/gdb/corelow.c b/gdb/corelow.c
index c176b24022d..4945b758382 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -59,6 +59,10 @@ 
 #define O_LARGEFILE 0
 #endif
 
+/* Forward declarations.  */
+
+static void core_target_open (const char *arg, int from_tty);
+
 /* A mem_range and the build-id associated with the file mapped into the
    given range.  */
 
@@ -904,9 +908,9 @@  locate_exec_from_corefile_build_id (bfd *abfd, core_target *target,
     }
 }
 
-/* See gdbcore.h.  */
+/* Open and set up the core file bfd.  */
 
-void
+static void
 core_target_open (const char *arg, int from_tty)
 {
   const char *p;
diff --git a/gdb/gdbcore.h b/gdb/gdbcore.h
index 782643acf56..eb318d557d4 100644
--- a/gdb/gdbcore.h
+++ b/gdb/gdbcore.h
@@ -124,10 +124,6 @@  extern void (*deprecated_file_changed_hook) (const char *filename);
 
 extern bool write_files;
 
-/* Open and set up the core file bfd.  */
-
-extern void core_target_open (const char *arg, int from_tty);
-
 extern void core_file_command (const char *filename, int from_tty);
 
 extern void exec_file_attach (const char *filename, int from_tty);