From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1879) id 379993858D35; Tue, 23 Apr 2024 01:37:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 379993858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1713836243; bh=HNMUs9mvGepcFP93ee2l7z4L2hHXC4tHGYetOquxL6c=; h=From:To:Subject:Date:From; b=TZDErsUgz72QUBnOSc26PXM1St5PQuYRF3QvXL3THoqm283aHY+wfE+w0b1NAXYSq arkYq4Qo+6uEQ6iUJ38NugHWdbFQ1xzV/tgjZXK5xOXIz3QNN29gp7O/NOWS5VOP4q V/H65n6VzENn9u8OBpfeblFj4eO0wBIT1RMHS2xc= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Simon Marchi To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: move two declarations out of defs.h X-Act-Checkin: binutils-gdb X-Git-Author: Simon Marchi X-Git-Refname: refs/heads/master X-Git-Oldrev: 5b4c41267ff1ac2c907176bc81e2490d7e68c696 X-Git-Newrev: 7b21ae941ee8e296c6aea21df1ede6cc3cffe248 Message-Id: <20240423013723.379993858D35@sourceware.org> Date: Tue, 23 Apr 2024 01:37:23 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D7b21ae941ee8= e296c6aea21df1ede6cc3cffe248 commit 7b21ae941ee8e296c6aea21df1ede6cc3cffe248 Author: Simon Marchi Date: Mon Apr 22 16:10:11 2024 -0400 gdb: move two declarations out of defs.h =20 Move declarations of initialize_progspace and initialize_inferiors to progspace.h and inferior.h, respectively. =20 Change-Id: I62292ffda429861b9f27d8c836a56d161dfa548d Approved-By: John Baldwin 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 =20 -/* From progspace.c */ - -extern void initialize_progspace (void); -extern void initialize_inferiors (void); - /* * Special block numbers */ =20 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_func= s =3D NULL, }; =20 -=0C +/* See inferior.h. */ =20 void -initialize_inferiors (void) +initialize_inferiors () { struct cmd_list_element *c =3D NULL; =20 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; }; =20 +/* Initialize the inferior-related global state. */ +extern void initialize_inferiors (); + /* Return a pointer to the current inferior. */ extern inferior *current_inferior (); =20 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 (); } =20 -=0C +/* See progspace.h. */ =20 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::vectorprogram_space= s; /* The current program space. This is always non-null. */ extern struct program_space *current_program_space; =20 +/* 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 *de= st,