* [RFA] Remove ADD_SHARED_SYMBOL_FILES macro
@ 2009-05-14 22:23 Pierre Muller
2009-05-22 15:30 ` [RFA/Windows] " Joel Brobecker
0 siblings, 1 reply; 11+ messages in thread
From: Pierre Muller @ 2009-05-14 22:23 UTC (permalink / raw)
To: gdb-patches
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);
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA/Windows] Remove ADD_SHARED_SYMBOL_FILES macro
2009-05-14 22:23 [RFA] Remove ADD_SHARED_SYMBOL_FILES macro Pierre Muller
@ 2009-05-22 15:30 ` Joel Brobecker
2009-05-22 17:10 ` Christopher Faylor
0 siblings, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2009-05-22 15:30 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
> 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.
This part is fine.
> * windows-nat.c (_initialize_windows_nat): to here.
This part, however, is unnecessary, I think. There is already a command
called dll-symbols that calls the very same function (dll_symbol_command).
My suggestion would be to delete the add-shared-symbols-files entirely,
or to make it a deprecated alias to dll-symbols.
Chris, what do you think?
> * 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.
This part is fine.
Thanks for doing this,
--
Joel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA/Windows] Remove ADD_SHARED_SYMBOL_FILES macro
2009-05-22 15:30 ` [RFA/Windows] " Joel Brobecker
@ 2009-05-22 17:10 ` Christopher Faylor
2009-05-24 12:36 ` Pierre Muller
0 siblings, 1 reply; 11+ messages in thread
From: Christopher Faylor @ 2009-05-22 17:10 UTC (permalink / raw)
To: gdb-patches, Joel Brobecker, Pierre Muller
Thanks for relabelling the subject so that I'd notice it.
On Fri, May 22, 2009 at 08:30:42AM -0700, Joel Brobecker wrote:
>> 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.
>
>This part is fine.
>
>> * windows-nat.c (_initialize_windows_nat): to here.
>
>This part, however, is unnecessary, I think. There is already a command
>called dll-symbols that calls the very same function (dll_symbol_command).
>My suggestion would be to delete the add-shared-symbols-files entirely,
>or to make it a deprecated alias to dll-symbols.
>
>Chris, what do you think?
I don't know enough about how other people use this command. I use
dll-symbols all of the time (for one specific dll which shall go
unamed). I don't know if people are using other commands instead so I
don't think it can be deleted. Making it an alias makes sense, though.
With that change, I'm fine with checking this in.
cgf
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [RFA/Windows] Remove ADD_SHARED_SYMBOL_FILES macro
2009-05-22 17:10 ` Christopher Faylor
@ 2009-05-24 12:36 ` Pierre Muller
2009-05-25 6:17 ` Joel Brobecker
0 siblings, 1 reply; 11+ messages in thread
From: Pierre Muller @ 2009-05-24 12:36 UTC (permalink / raw)
To: gdb-patches, 'Joel Brobecker'
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Christopher Faylor
> Envoyé : Friday, May 22, 2009 7:10 PM
> À : gdb-patches@sourceware.org; Joel Brobecker; Pierre Muller
> Objet : Re: [RFA/Windows] Remove ADD_SHARED_SYMBOL_FILES macro
>
> Thanks for relabelling the subject so that I'd notice it.
>
> On Fri, May 22, 2009 at 08:30:42AM -0700, Joel Brobecker wrote:
> >> 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.
> >
> >This part is fine.
> >
> >> * windows-nat.c (_initialize_windows_nat): to here.
> >
> >This part, however, is unnecessary, I think. There is already a
> command
> >called dll-symbols that calls the very same function
> (dll_symbol_command).
> >My suggestion would be to delete the add-shared-symbols-files
> entirely,
> >or to make it a deprecated alias to dll-symbols.
> >
> >Chris, what do you think?
>
> I don't know enough about how other people use this command. I use
> dll-symbols all of the time (for one specific dll which shall go
> unamed). I don't know if people are using other commands instead so I
> don't think it can be deleted. Making it an alias makes sense, though.
>
> With that change, I'm fine with checking this in.
Thanks, I committed the patch with
add-shared-symbol-files as an alias.
This patch removes config/i386/nm-cygwin*.h headers
If I try to do a
simple make at gdb level I get this:
$ make
# Regenerate the Makefile and the tm.h / nm.h links.
CONFIG_FILES="Makefile" \
CONFIG_COMMANDS= \
CONFIG_HEADERS= \
/bin/sh config.status
config.status: creating Makefile
config.status: linking ../../purecvs/gdb/config/i386/nm-cygwin.h to nm.h
config.status: error: ../../purecvs/gdb/config/i386/nm-cygwin.h: file not
found
make: *** [Makefile] Error 1
Is this an error in the Makefile?
Going up one level and doing 'make all-gdb' doesn't help,
but doing a
./config.status --recheck
allows to get complilation to succeed again.
(I didn't try 'make clean all', this might be enough...)
Pierre Muller
Pascal language support maintainer for GDB
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA/Windows] Remove ADD_SHARED_SYMBOL_FILES macro
2009-05-24 12:36 ` Pierre Muller
@ 2009-05-25 6:17 ` Joel Brobecker
2009-05-25 8:40 ` Pierre Muller
0 siblings, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2009-05-25 6:17 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
Pierre,
> Thanks, I committed the patch with
> add-shared-symbol-files as an alias.
Would you mind posting the patch that you committed. I'd like to
double-check it; you never know.
> This patch removes config/i386/nm-cygwin*.h headers
> If I try to do a
> simple make at gdb level I get this:
> $ make
> # Regenerate the Makefile and the tm.h / nm.h links.
> CONFIG_FILES="Makefile" \
> CONFIG_COMMANDS= \
> CONFIG_HEADERS= \
> /bin/sh config.status
> config.status: creating Makefile
> config.status: linking ../../purecvs/gdb/config/i386/nm-cygwin.h to nm.h
> config.status: error: ../../purecvs/gdb/config/i386/nm-cygwin.h: file not
> found
> make: *** [Makefile] Error 1
>
> Is this an error in the Makefile?
I've seen this before too. I don't know if there is something we can do
or not. I usually end up reconfiguring.
--
Joel
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [RFA/Windows] Remove ADD_SHARED_SYMBOL_FILES macro
2009-05-25 6:17 ` Joel Brobecker
@ 2009-05-25 8:40 ` Pierre Muller
2009-05-25 22:57 ` Joel Brobecker
0 siblings, 1 reply; 11+ messages in thread
From: Pierre Muller @ 2009-05-25 8:40 UTC (permalink / raw)
To: 'Joel Brobecker'; +Cc: gdb-patches
Sorry, I forgot to put the final patch
in the email.
Concerning the build failure, I managed to
get it to work with a 'make distclean' at gdb level,
followed by a 'make all-gdb' at src level.
('make all' after distclean fails at gdb level).
Pierre Muller
Pascal language support maintainer for GDB
ChangeLog Entry:
2009-05-24 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.
Change "add-shared-symbol-files" to alias.
* 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: 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);
Index: config/i386/mingw64.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/mingw64.mh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- config/i386/mingw64.mh 12 Jan 2009 01:10:28 -0000 1.2
+++ config/i386/mingw64.mh 24 May 2009 12:27:35 -0000 1.3
@@ -1,2 +1 @@
NATDEPFILES= i386-nat.o windows-nat.o amd64-windows-nat.o
-NAT_FILE=nm-cygwin64.h
Index: config/i386/mingw.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/mingw.mh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- config/i386/mingw.mh 12 Jan 2009 01:10:28 -0000 1.3
+++ config/i386/mingw.mh 24 May 2009 12:27:35 -0000 1.4
@@ -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/cygwin.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/cygwin.mh,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- config/i386/cygwin.mh 12 Jan 2009 01:10:28 -0000 1.10
+++ config/i386/cygwin.mh 24 May 2009 12:27:35 -0000 1.11
@@ -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: windows-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/windows-nat.c,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -p -r1.191 -r1.192
--- windows-nat.c 21 May 2009 15:48:41 -0000 1.191
+++ windows-nat.c 24 May 2009 12:27:35 -0000 1.192
@@ -2205,6 +2205,10 @@ _initialize_windows_nat (void)
add_com_alias ("sharedlibrary", "dll-symbols", class_alias, 1);
+ add_com_alias ("add-shared-symbol-files", "dll-symbols", class_alias, 1);
+
+ add_com_alias ("assf", "dll-symbols", class_alias, 1);
+
#ifdef __CYGWIN__
add_setshow_boolean_cmd ("shell", class_support, &useshell, _("\
Set use of shell to start subprocess."), _("\
Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.228
retrieving revision 1.229
diff -u -p -r1.228 -r1.229
--- symfile.c 22 May 2009 23:49:13 -0000 1.228
+++ symfile.c 24 May 2009 12:27:35 -0000 1.229
@@ -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\
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA/Windows] Remove ADD_SHARED_SYMBOL_FILES macro
2009-05-25 8:40 ` Pierre Muller
@ 2009-05-25 22:57 ` Joel Brobecker
2009-05-25 23:13 ` Pedro Alves
0 siblings, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2009-05-25 22:57 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
> (_initialize _symfile): Move "add-shared-symbol-files"
> command and "assf" alias.
> * windows-nat.c (_initialize_windows_nat): to here.
> Change "add-shared-symbol-files" to alias.
I propose we deprecate these aliases as well; does it really make sense
to have 2 identical commands?
--
Joel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA/Windows] Remove ADD_SHARED_SYMBOL_FILES macro
2009-05-25 22:57 ` Joel Brobecker
@ 2009-05-25 23:13 ` Pedro Alves
2009-06-22 20:50 ` Joel Brobecker
0 siblings, 1 reply; 11+ messages in thread
From: Pedro Alves @ 2009-05-25 23:13 UTC (permalink / raw)
To: gdb-patches; +Cc: Joel Brobecker, Pierre Muller
On Monday 25 May 2009 23:57:25, Joel Brobecker wrote:
> > (_initialize _symfile): Move "add-shared-symbol-files"
> > command and "assf" alias.
> > * windows-nat.c (_initialize_windows_nat): to here.
> > Change "add-shared-symbol-files" to alias.
>
> I propose we deprecate these aliases as well; does it really make sense
> to have 2 identical commands?
>
Well, let me go the other way around. Why is "dll-symbols" needed
at all? Why isn't "add-symbol-file" good enough? Other than the
ugly safe_symbol_file_add hack that would be nice to get rid of,
and setting OBJF_SHARED (itself dubious) it doesn't have anything Windows
specific at all (magically appending ".dll" doesn't count).
--
Pedro Alves
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA/Windows] Remove ADD_SHARED_SYMBOL_FILES macro
2009-05-25 23:13 ` Pedro Alves
@ 2009-06-22 20:50 ` Joel Brobecker
2009-06-23 1:55 ` Christopher Faylor
0 siblings, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2009-06-22 20:50 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches, Pierre Muller
[trying to catch up on email...]
> On Monday 25 May 2009 23:57:25, Joel Brobecker wrote:
> > > (_initialize _symfile): Move "add-shared-symbol-files"
> > > command and "assf" alias.
> > > * windows-nat.c (_initialize_windows_nat): to here.
> > > Change "add-shared-symbol-files" to alias.
> >
> > I propose we deprecate these aliases as well; does it really make sense
> > to have 2 identical commands?
> >
>
> Well, let me go the other way around. Why is "dll-symbols" needed
> at all? Why isn't "add-symbol-file" good enough? Other than the
> ugly safe_symbol_file_add hack that would be nice to get rid of,
> and setting OBJF_SHARED (itself dubious) it doesn't have anything Windows
> specific at all (magically appending ".dll" doesn't count).
I would love to get rid of these commands if they are indeed equivalent
to add-symbol-file. I assumed that there was a reason for the different
command name. Chris, do you remember?
--
Joel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA/Windows] Remove ADD_SHARED_SYMBOL_FILES macro
2009-06-22 20:50 ` Joel Brobecker
@ 2009-06-23 1:55 ` Christopher Faylor
2009-06-24 17:03 ` Pedro Alves
0 siblings, 1 reply; 11+ messages in thread
From: Christopher Faylor @ 2009-06-23 1:55 UTC (permalink / raw)
To: gdb-patches, Pedro Alves, Joel Brobecker, Pierre Muller
On Mon, Jun 22, 2009 at 01:49:50PM -0700, Joel Brobecker wrote:
>[trying to catch up on email...]
>
>> On Monday 25 May 2009 23:57:25, Joel Brobecker wrote:
>> > > (_initialize _symfile): Move "add-shared-symbol-files"
>> > > command and "assf" alias.
>> > > * windows-nat.c (_initialize_windows_nat): to here.
>> > > Change "add-shared-symbol-files" to alias.
>> >
>> > I propose we deprecate these aliases as well; does it really make sense
>> > to have 2 identical commands?
>> >
>>
>>Well, let me go the other way around. Why is "dll-symbols" needed at
>>all? Why isn't "add-symbol-file" good enough? Other than the ugly
>>safe_symbol_file_add hack that would be nice to get rid of, and setting
>>OBJF_SHARED (itself dubious) it doesn't have anything Windows specific
>>at all (magically appending ".dll" doesn't count).
>
>I would love to get rid of these commands if they are indeed equivalent
>to add-symbol-file. I assumed that there was a reason for the
>different command name. Chris, do you remember?
(gdb) add-symbol-file cygwin1.dll
The address where cygwin1.dll has been loaded is missing
(gdb) dll cygwin1.dll
(gdb) l dll_crt0
952 _main_tls = &_my_tls;
953 _main_tls->call ((DWORD (*) (void *, void *)) dll_crt0_1, NULL);
954 }
955
956 void
957 dll_crt0 (per_process *uptr)
958 {
959 /* Set the local copy of the pointer into the user space. */
960 if (!in_forkee && uptr && uptr != user_data)
961 {
As I have previously mentioned, the commands are not equivalent.
cgf
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA/Windows] Remove ADD_SHARED_SYMBOL_FILES macro
2009-06-23 1:55 ` Christopher Faylor
@ 2009-06-24 17:03 ` Pedro Alves
0 siblings, 0 replies; 11+ messages in thread
From: Pedro Alves @ 2009-06-24 17:03 UTC (permalink / raw)
To: Christopher Faylor; +Cc: gdb-patches, Joel Brobecker, Pierre Muller
On Tuesday 23 June 2009 02:54:41, Christopher Faylor wrote:
> On Mon, Jun 22, 2009 at 01:49:50PM -0700, Joel Brobecker wrote:
> >[trying to catch up on email...]
> >
> >> On Monday 25 May 2009 23:57:25, Joel Brobecker wrote:
> >> > > (_initialize _symfile): Move "add-shared-symbol-files"
> >> > > command and "assf" alias.
> >> > > * windows-nat.c (_initialize_windows_nat): to here.
> >> > > Change "add-shared-symbol-files" to alias.
> >> >
> >> > I propose we deprecate these aliases as well; does it really make sense
> >> > to have 2 identical commands?
> >> >
> >>
> >>Well, let me go the other way around. Why is "dll-symbols" needed at
> >>all? Why isn't "add-symbol-file" good enough? Other than the ugly
> >>safe_symbol_file_add hack that would be nice to get rid of, and setting
> >>OBJF_SHARED (itself dubious) it doesn't have anything Windows specific
> >>at all (magically appending ".dll" doesn't count).
> >
> >I would love to get rid of these commands if they are indeed equivalent
> >to add-symbol-file. I assumed that there was a reason for the
> >different command name. Chris, do you remember?
>
> (gdb) add-symbol-file cygwin1.dll
> The address where cygwin1.dll has been loaded is missing
> (gdb) dll cygwin1.dll
> (gdb) l dll_crt0
> 952 _main_tls = &_my_tls;
> 953 _main_tls->call ((DWORD (*) (void *, void *)) dll_crt0_1, NULL);
> 954 }
> 955
> 956 void
> 957 dll_crt0 (per_process *uptr)
> 958 {
> 959 /* Set the local copy of the pointer into the user space. */
> 960 if (!in_forkee && uptr && uptr != user_data)
> 961 {
>
> As I have previously mentioned, the commands are not equivalent.
Wouldn't "add-symbol-file cygwin1.dll 0" have pretty much
the effect you want?
(gdb) add-symbol-file dll.dll 0
add symbol table from file "dll.dll" at
.text_addr = 0x0
(y or n) y
Reading symbols from /home/pedro/dll.dll...done.
(gdb) list foo
1
2 __declspec(dllexport) int foo ()
3 {
4 return 0;
5 }
(gdb)
Or, even:
(gdb) define dll-symbols2
Type commands for definition of "dll-symbols2".
End with a line saying just "end".
>add-symbol-file $arg0 0
>end
(gdb) dll-symbols2 dll.dll
add symbol table from file "dll.dll" at
.text_addr = 0x0
(gdb) list foo
1
2 __declspec(dllexport) int foo ()
3 {
4 return 0;
5 }
(gdb)
This is a legitimate question. I'm probably missing something
important that is possible with dll-symbols and not with
add-symbol-file. I'd be nice to understand it, since the command
uses OBJF_SHARED for a user added object -- I can picture having these
uses misunderstood making the job harder for people working on
objfiles (re-)designs, for example.
The other point I was getting across, and which Ulrich also pointed out
in the other thread Pierre started that led to this patch, is that I
it is a bit wrong to see this command/feature, being a symbols
related command, included in a native Windows hosted gdb, while not,
e.g., in a cross to Windows; or having it be a Windows specific at
all, given that it doesn't seem to contain anything Windows related,
other than the points I already mentioned. But this latter issue is
not something worth iterating much over.
--
Pedro Alves
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-06-24 17:03 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-14 22:23 [RFA] Remove ADD_SHARED_SYMBOL_FILES macro Pierre Muller
2009-05-22 15:30 ` [RFA/Windows] " Joel Brobecker
2009-05-22 17:10 ` Christopher Faylor
2009-05-24 12:36 ` Pierre Muller
2009-05-25 6:17 ` Joel Brobecker
2009-05-25 8:40 ` Pierre Muller
2009-05-25 22:57 ` Joel Brobecker
2009-05-25 23:13 ` Pedro Alves
2009-06-22 20:50 ` Joel Brobecker
2009-06-23 1:55 ` Christopher Faylor
2009-06-24 17:03 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox