From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1879) id 9A340384AB7C; Tue, 23 Apr 2024 15:29:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A340384AB7C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1713886157; bh=JsOJ//fw6SCdYkFhog43m1q74SMI3cuttkKWutAIf1U=; h=From:To:Subject:Date:From; b=T0xXXSpobjEbCzl2fuZpuugQuFlGcy2cQ9uSSBAYNP/JZE8TMjaUycriEgoHQLYwn iMbxuZrPuvf39uiNWegExZQADeIPHCAJoonOT1fpLrnprqmyriJ9EgZNC8lZrppu+Z FMgWl1AhmTX7YWoNUmqcdiaALJQ/C0/WhpxPoaXE= 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 symbol_file_command declaration to symfile.h X-Act-Checkin: binutils-gdb X-Git-Author: Simon Marchi X-Git-Refname: refs/heads/master X-Git-Oldrev: cbf58b22f76b25d4528c08941fcc380d03ec34e2 X-Git-Newrev: 9085a018caf2c0f27d85bc9d306a54fe390b99c2 Message-Id: <20240423152917.9A340384AB7C@sourceware.org> Date: Tue, 23 Apr 2024 15:29:17 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D9085a018caf2= c0f27d85bc9d306a54fe390b99c2 commit 9085a018caf2c0f27d85bc9d306a54fe390b99c2 Author: Simon Marchi Date: Tue Apr 23 09:23:02 2024 -0400 gdb: move symbol_file_command declaration to symfile.h =20 Move it out of defs.h, the corresponding definition is in symfile.c. =20 Change-Id: I984666c3bcd213f8574e9ec91462e1d61f77f16b Approved-By: Tom Tromey Diff: --- 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 ef5634da52c..8fde5be1cd3 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 reloc= atable); =20 -/* From symfile.c */ - -extern void symbol_file_command (const char *, int); - /* From top.c */ =20 typedef void initialize_file_ftype (void); diff --git a/gdb/symfile.c b/gdb/symfile.c index b7570a32dc0..883f1c0b050 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")); } =20 -/* 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. */ =20 void symbol_file_command (const char *args, int from_tty) diff --git a/gdb/symfile.h b/gdb/symfile.h index 6f8b441b39f..a5b0c91469c 100644 --- a/gdb/symfile.h +++ b/gdb/symfile.h @@ -379,4 +379,20 @@ extern int readnow_symbol_files; =20 extern int readnever_symbol_files; =20 +/* 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) */