public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [PATCH 7/7] gdb: move symbol_file_command declaration to symfile.h
Date: Tue, 23 Apr 2024 09:23:02 -0400	[thread overview]
Message-ID: <20240423132517.2625632-8-simon.marchi@polymtl.ca> (raw)
In-Reply-To: <20240423132517.2625632-1-simon.marchi@polymtl.ca>

Move it out of defs.h, the corresponding definition is in symfile.c.

Change-Id: I984666c3bcd213f8574e9ec91462e1d61f77f16b
---
 gdb/defs.h    |  4 ----
 gdb/symfile.c | 14 +-------------
 gdb/symfile.h | 16 ++++++++++++++++
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/gdb/defs.h b/gdb/defs.h
index ef5634da52c9..8fde5be1cd35 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -188,10 +188,6 @@ struct value;
    globals that are currently only available to main.c.  */
 extern std::string relocate_gdb_directory (const char *initial, bool relocatable);
 
-/* From symfile.c */
-
-extern void symbol_file_command (const char *, int);
-
 /* From top.c */
 
 typedef void initialize_file_ftype (void);
diff --git a/gdb/symfile.c b/gdb/symfile.c
index b7570a32dc0b..883f1c0b0505 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1596,19 +1596,7 @@ validate_readnow_readnever (objfile_flags flags)
     error (_("-readnow and -readnever cannot be used simultaneously"));
 }
 
-/* This is the symbol-file command.  Read the file, analyze its
-   symbols, and add a struct symtab to a symtab list.  The syntax of
-   the command is rather bizarre:
-
-   1. The function buildargv implements various quoting conventions
-   which are undocumented and have little or nothing in common with
-   the way things are quoted (or not quoted) elsewhere in GDB.
-
-   2. Options are used, which are not generally used in GDB (perhaps
-   "set mapped on", "set readnow on" would be better)
-
-   3. The order of options matters, which is contrary to GNU
-   conventions (because it is confusing and inconvenient).  */
+/* See symfile.h.  */
 
 void
 symbol_file_command (const char *args, int from_tty)
diff --git a/gdb/symfile.h b/gdb/symfile.h
index 6f8b441b39fd..a5b0c91469c7 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -379,4 +379,20 @@ extern int readnow_symbol_files;
 
 extern int readnever_symbol_files;
 
+/* This is the symbol-file command.  Read the file, analyze its
+   symbols, and add a struct symtab to a symtab list.  The syntax of
+   the command is rather bizarre:
+
+   1. The function buildargv implements various quoting conventions
+   which are undocumented and have little or nothing in common with
+   the way things are quoted (or not quoted) elsewhere in GDB.
+
+   2. Options are used, which are not generally used in GDB (perhaps
+   "set mapped on", "set readnow on" would be better)
+
+   3. The order of options matters, which is contrary to GNU
+   conventions (because it is confusing and inconvenient).  */
+
+extern void symbol_file_command (const char *, int);
+
 #endif /* !defined(SYMFILE_H) */
-- 
2.44.0


  parent reply	other threads:[~2024-04-23 13:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23 13:22 [PATCH 0/7] More cleanup of defs.h Simon Marchi
2024-04-23 13:22 ` [PATCH 1/7] gdb: move declarations of check_quit_flag and set_quit_flag to extension.h Simon Marchi
2024-04-25  8:52   ` Alexandra Petlanova Hajkova
2024-04-29 14:46     ` Simon Marchi
2024-04-23 13:22 ` [PATCH 2/7] gdb: change return type of check_quit_flag to bool Simon Marchi
2024-04-27  9:01   ` Alexandra Petlanova Hajkova
2024-04-23 13:22 ` [PATCH 3/7] gdb: change type of quit_flag " Simon Marchi
2024-04-23 13:22 ` [PATCH 4/7] gdb: move a bunch of quit-related things to event-top.{c,h} Simon Marchi
2024-04-23 13:23 ` [PATCH 5/7] gdb: move annotation_level declaration/definition to annotate.{h,c} Simon Marchi
2024-04-23 13:23 ` [PATCH 6/7] gdb: remove enum precision_type Simon Marchi
2024-04-23 13:23 ` Simon Marchi [this message]
2024-04-23 15:00 ` [PATCH 0/7] More cleanup of defs.h Tom Tromey
2024-04-23 15:30   ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240423132517.2625632-8-simon.marchi@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).