* [commit] Let {TM,XM,NM}_FILE specify a path
@ 2004-09-02 22:13 Andrew Cagney
2004-09-03 11:17 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2004-09-02 22:13 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 522 bytes --]
Hello,
Many of the still existing TM files (the others are done for
consistency) are just acting as an indirect include of another file.
For instance, tm-nbsd.h #includes "solib.h". This patch tweaks
configure.in so that a TM_FILE can explicitly specify any file (instead
of having to pull it in via an #include) - that lets us eliminate both
the indirection and the unnecessary config file.
It then tweaks arm/nbsd.mt to make use of this, letting arm/tm-nbsd.h be
eliminated. More to follow.
committed,
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 3426 bytes --]
2004-09-02 Andrew Cagney <cagney@gnu.org>
* configure.in: Let TM_FILE, XM_FILE and NAT_FILE specify a path.
* configure: Re-generate.
* config/arm/nbsd.mt (TM_FILE): Set to "solib.h".
* config/arm/tm-nbsd.h: Delete file.
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.168
diff -p -u -r1.168 configure.in
--- configure.in 2 Sep 2004 17:22:05 -0000 1.168
+++ configure.in 2 Sep 2004 22:01:13 -0000
@@ -1520,7 +1520,10 @@ rm -f xm.h
xm_h=""
if test "${hostfile}" != ""; then
xm_h=xm.h
- GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
+ case "${hostfile}" in
+ xm-*.h ) GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" ;;
+ * ) GDB_XM_FILE="${hostfile}"
+ esac
files="${files} ${GDB_XM_FILE}"
links="${links} xm.h"
AC_DEFINE_UNQUOTED(GDB_XM_FILE, "${GDB_XM_FILE}")
@@ -1531,7 +1534,10 @@ rm -f tm.h
tm_h=""
if test "${targetfile}" != ""; then
tm_h=tm.h
- GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
+ case "${targetfile}" in
+ tm-*.h ) GDB_TM_FILE="config/${gdb_host_cpu}/${targetfile}" ;;
+ * ) GDB_TM_FILE="${targetfile}"
+ esac
files="${files} ${GDB_TM_FILE}"
links="${links} tm.h"
AC_DEFINE_UNQUOTED(GDB_TM_FILE, "${GDB_TM_FILE}")
@@ -1542,7 +1548,10 @@ rm -f nm.h
nm_h=""
if test "${nativefile}" != ""; then
nm_h=nm.h
- GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
+ case "${nativefile}" in
+ nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
+ * ) GDB_NM_FILE="${nativefile}"
+ esac
files="${files} ${GDB_NM_FILE}"
links="${links} nm.h"
AC_DEFINE_UNQUOTED(GDB_NM_FILE, "${GDB_NM_FILE}")
Index: config/arm/nbsd.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/arm/nbsd.mt,v
retrieving revision 1.6
diff -p -u -r1.6 nbsd.mt
--- config/arm/nbsd.mt 14 Nov 2003 20:45:11 -0000 1.6
+++ config/arm/nbsd.mt 2 Sep 2004 22:01:13 -0000
@@ -1,3 +1,3 @@
# Target: ARM running NetBSD
TDEPFILES= arm-tdep.o armnbsd-tdep.o solib.o solib-svr4.o nbsd-tdep.o
-TM_FILE=tm-nbsd.h
+TM_FILE=solib.h
Index: config/arm/tm-nbsd.h
===================================================================
RCS file: config/arm/tm-nbsd.h
diff -N config/arm/tm-nbsd.h
--- config/arm/tm-nbsd.h 14 Nov 2003 20:45:12 -0000 1.9
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-/* Macro definitions for ARM running under NetBSD.
- Copyright 2003 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 2 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, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef TM_NBSD_H
-#define TM_NBSD_H
-
-#include "solib.h"
-
-#endif /* TM_NBSD_H */
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [commit] Let {TM,XM,NM}_FILE specify a path
2004-09-02 22:13 [commit] Let {TM,XM,NM}_FILE specify a path Andrew Cagney
@ 2004-09-03 11:17 ` Eli Zaretskii
2004-09-03 16:39 ` Andrew Cagney
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2004-09-03 11:17 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
> Date: Thu, 02 Sep 2004 18:12:22 -0400
> From: Andrew Cagney <cagney@gnu.org>
>
> Many of the still existing TM files (the others are done for
> consistency) are just acting as an indirect include of another file.
> For instance, tm-nbsd.h #includes "solib.h". This patch tweaks
> configure.in so that a TM_FILE can explicitly specify any file (instead
> of having to pull it in via an #include) - that lets us eliminate both
> the indirection and the unnecessary config file.
Perhaps we should rename TM_FILE to something like TM_INCLUDE, then.
Btw, did we decide upon all these recent changes against *_FILE
thingies? They aren't exactly obvious, so I'd expect them to be
posted as RFA's, at the least.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [commit] Let {TM,XM,NM}_FILE specify a path
2004-09-03 11:17 ` Eli Zaretskii
@ 2004-09-03 16:39 ` Andrew Cagney
2004-09-04 11:42 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2004-09-03 16:39 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
>>> Date: Thu, 02 Sep 2004 18:12:22 -0400
>>> From: Andrew Cagney <cagney@gnu.org>
>>>
>>> Many of the still existing TM files (the others are done for
>>> consistency) are just acting as an indirect include of another file.
>>> For instance, tm-nbsd.h #includes "solib.h". This patch tweaks
>>> configure.in so that a TM_FILE can explicitly specify any file (instead
>>> of having to pull it in via an #include) - that lets us eliminate both
>>> the indirection and the unnecessary config file.
>
>
> Perhaps we should rename TM_FILE to something like TM_INCLUDE, then.
If you prefer, I can rename it to DEPRECATED_TM_INCLUDE when committing
my pending deprecation patch.
> Btw, did we decide upon all these recent changes against *_FILE
> thingies?
Long long ago we decided that GDB would be strictly multi-arch, and
hence that all tm-*.h files (and TM_FILE hackery) should be deleted.
This deletes another 13 of those files.
If you prefer I can delete the tm-*.h files and TM_FILE configury outright.
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [commit] Let {TM,XM,NM}_FILE specify a path
2004-09-03 16:39 ` Andrew Cagney
@ 2004-09-04 11:42 ` Eli Zaretskii
2004-09-09 15:17 ` Andrew Cagney
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2004-09-04 11:42 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
> Date: Fri, 03 Sep 2004 12:38:18 -0400
> From: Andrew Cagney <cagney@gnu.org>
> Cc: gdb-patches@sources.redhat.com
>
> > Perhaps we should rename TM_FILE to something like TM_INCLUDE, then.
>
> If you prefer, I can rename it to DEPRECATED_TM_INCLUDE when committing
> my pending deprecation patch.
If we change the functionality of TM_FILE (so it can now name any
file), then it doesn't seem to be deprecated. Thus,
DEPRECATED_TM_INCLUDE seems an inappropriate name to me.
> > Btw, did we decide upon all these recent changes against *_FILE
> > thingies?
>
> Long long ago we decided that GDB would be strictly multi-arch, and
> hence that all tm-*.h files (and TM_FILE hackery) should be deleted.
Perhaps so, but that doesn't make those changes obvious, IMHO. They
should be suggested as RFA's, as we do with any other change whose
idea was approved. The fact that the idea was approved merely means
that there's no need for an RFC. At least that is how I understand
the GDB development and patch-approval process. If I misunderstand,
please point me to the text that says otherwise.
> If you prefer I can delete the tm-*.h files and TM_FILE configury outright.
If this was a joke, then I'm not amused.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [commit] Let {TM,XM,NM}_FILE specify a path
2004-09-04 11:42 ` Eli Zaretskii
@ 2004-09-09 15:17 ` Andrew Cagney
2004-09-09 19:19 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2004-09-09 15:17 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
>>> Date: Fri, 03 Sep 2004 12:38:18 -0400
>>> From: Andrew Cagney <cagney@gnu.org>
>>> Cc: gdb-patches@sources.redhat.com
>>>
>>
>>>> > Perhaps we should rename TM_FILE to something like TM_INCLUDE, then.
>>
>>>
>>> If you prefer, I can rename it to DEPRECATED_TM_INCLUDE when committing
>>> my pending deprecation patch.
>
>
> If we change the functionality of TM_FILE (so it can now name any
> file), then it doesn't seem to be deprecated. Thus,
> DEPRECATED_TM_INCLUDE seems an inappropriate name to me.
I've now prototyped this change vis:
TM_FILE -> TM_INCLUDE
NAT_FILE -> NM_INCLUDE (for consistency)
XM_FILE -> XM_INCLUDE
and found that it didn't help.
TM_FILE specifies the name of the file that is linked to "tm.h". My
patch does not change this. It just removes a restriction on what could
be specified for that file.
If we were to say, eliminate "tm.h", and instead include the tm file
directly than I could certainly see some sort of name change vis:
#ifdef TM_INCLUDE_FILE
#include TM_INCLUDE_FILE
#endif
I've also prototyped this. I discarded it - I didn't see sufficient
value add.
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [commit] Let {TM,XM,NM}_FILE specify a path
2004-09-09 15:17 ` Andrew Cagney
@ 2004-09-09 19:19 ` Eli Zaretskii
0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2004-09-09 19:19 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
> Date: Thu, 09 Sep 2004 11:17:18 -0400
> From: Andrew Cagney <cagney@gnu.org>
> Cc: gdb-patches@sources.redhat.com
>
> I've now prototyped this change vis:
> TM_FILE -> TM_INCLUDE
> NAT_FILE -> NM_INCLUDE (for consistency)
> XM_FILE -> XM_INCLUDE
> and found that it didn't help.
>
> TM_FILE specifies the name of the file that is linked to "tm.h". My
> patch does not change this. It just removes a restriction on what could
> be specified for that file.
I still don't see why TM_INCLUDE isn't a better name, but if you feel
strongly about keeping the current name, I won't object. TM_INCLUDE
was just a suggestion, anyway.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-09-09 19:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-02 22:13 [commit] Let {TM,XM,NM}_FILE specify a path Andrew Cagney
2004-09-03 11:17 ` Eli Zaretskii
2004-09-03 16:39 ` Andrew Cagney
2004-09-04 11:42 ` Eli Zaretskii
2004-09-09 15:17 ` Andrew Cagney
2004-09-09 19:19 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox