This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] Remove ADD_SHARED_SYMBOL_FILES macro
- From: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- To: <gdb-patches at sourceware dot org>
- Date: Fri, 15 May 2009 00:23:23 +0200
- Subject: [RFA] Remove ADD_SHARED_SYMBOL_FILES macro
The following patch removes the nm macro
ADD_SHARED_SYMBOL_FILES.
Instead I just moved the adding of "add-shared-symbol-files"
command and "assf" alias to windows-nat.c source,
as it was only defined for windows.
The only point is that we have four commands:
"sharedlibrary", "dll-symbols", "assf" and "add-shared-symbol-files"
but the patch didn't change this.
As it is now, this patch introduces no behavior change.
The only thing is that for cygwin or mingw native,
as nm.h disappears, the compilation might fail
if you just go to build/gdb directory.
After this is done, nm-cygwin.h and nm-cygwin64.h
are empty and can consequently be removed.
Christopher, as this patch mainly affects
windows files, I think that you should approve iit, no?
Pierre Muller
Pascal language support maintainer for GDB
2009-05-15 Pierre Muller <muller@ics.u-strasbg.fr>
* symfile.c (add_shared_symbol_files_command): Remove
prototype and function.
(_initialize _symfile): Move "add-shared-symbol-files"
command and "assf" alias.
* windows-nat.c (_initialize_windows_nat): to here.
* config/i386/cygwin.mh: Remove NAT_FILE.
* config/i386/mingw.mh: Remove NAT_FILE.
* config/i386/mingw64.mh: Remove NAT_FILE.
* config/i386/nm-cygwin.h: Remove file.
* config/i386/nm-cygwin64.h: Remove file.
Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.225
diff -u -p -r1.225 symfile.c
--- symfile.c 5 May 2009 13:24:49 -0000 1.225
+++ symfile.c 14 May 2009 21:56:45 -0000
@@ -96,8 +96,6 @@ static void symbol_file_add_main_1 (char
static void add_symbol_file_command (char *, int);
-static void add_shared_symbol_files_command (char *, int);
-
static void reread_separate_symbols (struct objfile *objfile);
static void cashier_psymtab (struct partial_symtab *);
@@ -2234,16 +2232,7 @@ add_symbol_file_command (char *args, int
do_cleanups (my_cleanups);
}
-static void
-add_shared_symbol_files_command (char *args, int from_tty)
-{
-#ifdef ADD_SHARED_SYMBOL_FILES
- ADD_SHARED_SYMBOL_FILES (args, from_tty);
-#else
- error (_("This command is not available in this configuration of GDB."));
-#endif
-}
-
+
/* Re-read symbols if a symbol-file has changed. */
void
reread_symbols (void)
@@ -4102,13 +4091,6 @@ with the text. SECT is a section name t
&cmdlist);
set_cmd_completer (c, filename_completer);
- c = add_cmd ("add-shared-symbol-files", class_files,
- add_shared_symbol_files_command, _("\
-Load the symbols from shared objects in the dynamic linker's link map."),
- &cmdlist);
- c = add_alias_cmd ("assf", "add-shared-symbol-files", class_files, 1,
- &cmdlist);
-
c = add_cmd ("load", class_files, load_command, _("\
Dynamically load FILE into the running program, and record its symbols\n\
for access from GDB.\n\
Index: windows-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/windows-nat.c,v
retrieving revision 1.190
diff -u -p -r1.190 windows-nat.c
--- windows-nat.c 14 May 2009 09:37:00 -0000 1.190
+++ windows-nat.c 14 May 2009 21:56:46 -0000
@@ -2205,6 +2205,13 @@ _initialize_windows_nat (void)
add_com_alias ("sharedlibrary", "dll-symbols", class_alias, 1);
+ c = add_cmd ("add-shared-symbol-files", class_files,
+ dll_symbol_command, _("\
+Load the symbols from shared objects in the dynamic linker's link map."),
+ &cmdlist);
+ c = add_alias_cmd ("assf", "add-shared-symbol-files", class_files, 1,
+ &cmdlist);
+
#ifdef __CYGWIN__
add_setshow_boolean_cmd ("shell", class_support, &useshell, _("\
Set use of shell to start subprocess."), _("\
Index: config/i386/cygwin.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/cygwin.mh,v
retrieving revision 1.10
diff -u -p -r1.10 cygwin.mh
--- config/i386/cygwin.mh 12 Jan 2009 01:10:28 -0000 1.10
+++ config/i386/cygwin.mh 14 May 2009 21:56:46 -0000
@@ -1,4 +1,3 @@
MH_CFLAGS=
NATDEPFILES= i386-nat.o windows-nat.o i386-windows-nat.o
-NAT_FILE=nm-cygwin.h
XM_CLIBS=
Index: config/i386/mingw.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/mingw.mh,v
retrieving revision 1.3
diff -u -p -r1.3 mingw.mh
--- config/i386/mingw.mh 12 Jan 2009 01:10:28 -0000 1.3
+++ config/i386/mingw.mh 14 May 2009 21:56:46 -0000
@@ -1,4 +1,3 @@
MH_CFLAGS=
NATDEPFILES= i386-nat.o windows-nat.o i386-windows-nat.o
-NAT_FILE=nm-cygwin.h
XM_CLIBS=
Index: config/i386/mingw64.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/mingw64.mh,v
retrieving revision 1.2
diff -u -p -r1.2 mingw64.mh
--- config/i386/mingw64.mh 12 Jan 2009 01:10:28 -0000 1.2
+++ config/i386/mingw64.mh 14 May 2009 21:56:46 -0000
@@ -1,2 +1 @@
NATDEPFILES= i386-nat.o windows-nat.o amd64-windows-nat.o
-NAT_FILE=nm-cygwin64.h
Index: config/i386/nm-cygwin.h
===================================================================
RCS file: config/i386/nm-cygwin.h
diff -N config/i386/nm-cygwin.h
--- config/i386/nm-cygwin.h 14 May 2009 09:37:00 -0000 1.11
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,20 +0,0 @@
-/* Native definitions for Intel x86 running CYGWIN.
- Copyright 2002, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
-#define ADD_SHARED_SYMBOL_FILES dll_symbol_command
-void dll_symbol_command (char *, int);
Index: config/i386/nm-cygwin64.h
===================================================================
RCS file: config/i386/nm-cygwin64.h
diff -N config/i386/nm-cygwin64.h
--- config/i386/nm-cygwin64.h 14 May 2009 09:37:00 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-/* Copyright 2008, 2009 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
-#define ADD_SHARED_SYMBOL_FILES dll_symbol_command
-void dll_symbol_command (char *, int);