public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb: move two declarations out of defs.h
@ 2024-04-23  1:37 Simon Marchi
  0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2024-04-23  1:37 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7b21ae941ee8e296c6aea21df1ede6cc3cffe248

commit 7b21ae941ee8e296c6aea21df1ede6cc3cffe248
Author: Simon Marchi <simon.marchi@efficios.com>
Date:   Mon Apr 22 16:10:11 2024 -0400

    gdb: move two declarations out of defs.h
    
    Move declarations of initialize_progspace and initialize_inferiors to
    progspace.h and inferior.h, respectively.
    
    Change-Id: I62292ffda429861b9f27d8c836a56d161dfa548d
    Approved-By: John Baldwin <jhb@FreeBSD.org>

Diff:
---
 gdb/defs.h      | 5 -----
 gdb/inferior.c  | 4 ++--
 gdb/inferior.h  | 3 +++
 gdb/progspace.c | 4 ++--
 gdb/progspace.h | 3 +++
 5 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/gdb/defs.h b/gdb/defs.h
index cf471bf5d66..ce8f29b2cf6 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -588,11 +588,6 @@ extern int (*deprecated_ui_load_progress_hook) (const char *section,
 /* * A width that can achieve a better legibility for GDB MI mode.  */
 #define GDB_MI_MSG_WIDTH  80
 
-/* From progspace.c */
-
-extern void initialize_progspace (void);
-extern void initialize_inferiors (void);
-
 /* * Special block numbers */
 
 enum block_enum
diff --git a/gdb/inferior.c b/gdb/inferior.c
index 4e1d789d1ba..5621ea40a6d 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -1078,10 +1078,10 @@ static const struct internalvar_funcs inferior_funcs =
   NULL,
 };
 
-\f
+/* See inferior.h.  */
 
 void
-initialize_inferiors (void)
+initialize_inferiors ()
 {
   struct cmd_list_element *c = NULL;
 
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 7be28423aeb..e239aa5b3cf 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -327,6 +327,9 @@ struct inferior_control_state
   enum stop_kind stop_soon;
 };
 
+/* Initialize the inferior-related global state.  */
+extern void initialize_inferiors ();
+
 /* Return a pointer to the current inferior.  */
 extern inferior *current_inferior ();
 
diff --git a/gdb/progspace.c b/gdb/progspace.c
index 131cd2f1186..c3a9909dcd4 100644
--- a/gdb/progspace.c
+++ b/gdb/progspace.c
@@ -435,10 +435,10 @@ program_space::clear_solib_cache ()
   deleted_solibs.clear ();
 }
 
-\f
+/* See progspace.h.  */
 
 void
-initialize_progspace (void)
+initialize_progspace ()
 {
   add_cmd ("program-spaces", class_maintenance,
 	   maintenance_info_program_spaces_command,
diff --git a/gdb/progspace.h b/gdb/progspace.h
index 7f5e23df126..bbf54efa07a 100644
--- a/gdb/progspace.h
+++ b/gdb/progspace.h
@@ -424,6 +424,9 @@ extern std::vector<struct program_space *>program_spaces;
 /* The current program space.  This is always non-null.  */
 extern struct program_space *current_program_space;
 
+/* Initialize progspace-related global state.  */
+extern void initialize_progspace ();
+
 /* Copies program space SRC to DEST.  Copies the main executable file,
    and the main symbol file.  Returns DEST.  */
 extern struct program_space *clone_program_space (struct program_space *dest,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-23  1:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-23  1:37 [binutils-gdb] gdb: move two declarations out of defs.h Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).