* [patch/rfc, rfa:doco] Delete REGISTER_BYTES
@ 2003-09-14 21:24 Andrew Cagney
2003-09-14 22:12 ` Andrew Cagney
2003-09-21 12:38 ` Eli Zaretskii
0 siblings, 2 replies; 5+ messages in thread
From: Andrew Cagney @ 2003-09-14 21:24 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 85 bytes --]
The macro's now offically dead!
Eli, doco ok?
I'll follow up in a few days,
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 6466 bytes --]
Index: doc/ChangeLog
2003-09-14 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Delete
documentation on REGISTER_NAMES.
2003-09-14 Andrew Cagney <cagney@redhat.com>
* sparc-tdep.c (legacy_register_name): Delete function.
* mips-tdep.c (mips_dump_tdep): Do not print REGISTER_NAME.
(mips_gdbarch_init): Refer to MIPS_REGISTER_NAME in comments.
* infcmd.c (gdb_register_name): Delete variable.
* gdbarch.sh (SDB_REG_TO_REGNUM): Delete reference to
REGISTER_NAME and "tm.h".
* gdbarch.h, gdbarch.c: Regenerate.
* dpx2-nat.c (regmap): Refer to REGISTER_NAME and not
REGISTER_NAMES in comments.
* remote-st.c (get_reg_name), i386b-nat.c (tregmap): Ditto.
* m68klinux-nat.c (regmap): Ditto.
Index: dpx2-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/dpx2-nat.c,v
retrieving revision 1.3
diff -u -r1.3 dpx2-nat.c
--- dpx2-nat.c 6 Mar 2001 08:21:06 -0000 1.3
+++ dpx2-nat.c 14 Sep 2003 21:18:09 -0000
@@ -32,7 +32,7 @@
#include <sys/utsname.h>
\f
-/* this table must line up with REGISTER_NAMES in tm-68k.h */
+/* This table must line up with REGISTER_NAME in "m68k-tdep.c". */
/* symbols like 'A0' come from <sys/reg.h> */
static int regmap[] =
{
Index: i386b-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386b-nat.c,v
retrieving revision 1.7
diff -u -r1.7 i386b-nat.c
--- i386b-nat.c 18 Aug 2002 17:37:17 -0000 1.7
+++ i386b-nat.c 14 Sep 2003 21:18:27 -0000
@@ -23,7 +23,7 @@
#include <machine/reg.h>
-/* this table must line up with REGISTER_NAMES in tm-i386.h */
+/* This table must line up with REGISTER_NAME in "i386-tdep.c". */
/* symbols like 'tEAX' come from <machine/reg.h> */
static int tregmap[] =
{
Index: infcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/infcmd.c,v
retrieving revision 1.88
diff -u -r1.88 infcmd.c
--- infcmd.c 14 Sep 2003 16:32:13 -0000 1.88
+++ infcmd.c 14 Sep 2003 21:18:28 -0000
@@ -1476,9 +1476,6 @@
}
\f
-#ifdef REGISTER_NAMES
-char *gdb_register_names[] = REGISTER_NAMES;
-#endif
/* Print out the machine register regnum. If regnum is -1, print all
registers (print_all == 1) or all non-float and non-vector
registers (print_all == 0).
Index: m68klinux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/m68klinux-nat.c,v
retrieving revision 1.21
diff -u -r1.21 m68klinux-nat.c
--- m68klinux-nat.c 14 Sep 2003 16:32:13 -0000 1.21
+++ m68klinux-nat.c 14 Sep 2003 21:18:28 -0000
@@ -54,7 +54,7 @@
#include "target.h"
\f
-/* This table must line up with REGISTER_NAMES in tm-m68k.h */
+/* This table must line up with REGISTER_NAME in "m68k-tdep.c". */
static const int regmap[] =
{
PT_D0, PT_D1, PT_D2, PT_D3, PT_D4, PT_D5, PT_D6, PT_D7,
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.231
diff -u -r1.231 mips-tdep.c
--- mips-tdep.c 14 Sep 2003 16:32:13 -0000 1.231
+++ mips-tdep.c 14 Sep 2003 21:19:10 -0000
@@ -6047,11 +6047,8 @@
/* MIPS version of register names. NOTE: At present the MIPS
register name management is part way between the old -
- #undef/#define REGISTER_NAMES and the new REGISTER_NAME(nr).
+ #undef/#define MIPS_REGISTER_NAMES and the new REGISTER_NAME(nr).
Further work on it is required. */
- /* NOTE: many targets (esp. embedded) do not go thru the
- gdbarch_register_name vector at all, instead bypassing it
- by defining REGISTER_NAMES. */
set_gdbarch_register_name (gdbarch, mips_register_name);
set_gdbarch_read_pc (gdbarch, mips_read_pc);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
@@ -6402,8 +6399,6 @@
fprintf_unfiltered (file,
"mips_dump_tdep: RA_REGNUM = %d\n",
RA_REGNUM);
- fprintf_unfiltered (file,
- "mips_dump_tdep: REGISTER_NAMES = delete?\n");
fprintf_unfiltered (file,
"mips_dump_tdep: ROUND_DOWN = function?\n");
fprintf_unfiltered (file,
Index: remote-st.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-st.c,v
retrieving revision 1.18
diff -u -r1.18 remote-st.c
--- remote-st.c 12 Nov 2002 21:43:55 -0000 1.18
+++ remote-st.c 14 Sep 2003 21:19:58 -0000
@@ -385,9 +385,10 @@
return inferior_ptid;
}
-/* Return the name of register number REGNO in the form input and output by
- STDEBUG. Currently, REGISTER_NAMES just happens to contain exactly what
- STDEBUG wants. Lets take advantage of that just as long as possible! */
+/* Return the name of register number REGNO in the form input and
+ output by STDEBUG. Currently, REGISTER_NAME just happens return
+ exactly what STDEBUG wants. Lets take advantage of that just as
+ long as possible! */
static char *
get_reg_name (int regno)
Index: sparc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-tdep.c,v
retrieving revision 1.125
diff -u -r1.125 sparc-tdep.c
--- sparc-tdep.c 14 Sep 2003 16:32:14 -0000 1.125
+++ sparc-tdep.c 14 Sep 2003 21:20:17 -0000
@@ -2815,24 +2815,6 @@
paddr_nz (get_frame_extra_info (fi)->fp_addr));
}
-/* MULTI_ARCH support */
-
-const char *
-legacy_register_name (int i)
-{
-#ifdef REGISTER_NAMES
- static char *names[] = REGISTER_NAMES;
- if (i < 0 || i >= (sizeof (names) / sizeof (*names)))
- return NULL;
- else
- return names[i];
-#else
- internal_error (__FILE__, __LINE__,
- "legacy_register_name: called.");
- return NULL;
-#endif
-}
-
static const char *
sparc32_register_name (int regno)
{
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.161
diff -u -r1.161 gdbint.texinfo
--- doc/gdbint.texinfo 13 Sep 2003 14:12:41 -0000 1.161
+++ doc/gdbint.texinfo 14 Sep 2003 21:21:23 -0000
@@ -3756,10 +3756,6 @@
Return the name of register @var{i} as a string. May return @code{NULL}
or @code{NUL} to indicate that register @var{i} is not valid.
-@item REGISTER_NAMES
-@findex REGISTER_NAMES
-Deprecated in favor of @code{REGISTER_NAME}.
-
@item DEPRECATED_REG_STRUCT_HAS_ADDR (@var{gcc_p}, @var{type})
@findex DEPRECATED_REG_STRUCT_HAS_ADDR
Define this to return 1 if the given type will be passed by pointer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch/rfc, rfa:doco] Delete REGISTER_BYTES
2003-09-14 21:24 [patch/rfc, rfa:doco] Delete REGISTER_BYTES Andrew Cagney
@ 2003-09-14 22:12 ` Andrew Cagney
2003-09-17 19:39 ` Delete REGISTER_NAMES; Was: " Andrew Cagney
2003-09-21 12:38 ` Eli Zaretskii
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2003-09-14 22:12 UTC (permalink / raw)
To: gdb-patches
> The macro's now offically dead!
>
> Eli, doco ok?
>
> I'll follow up in a few days,
> Andrew
>
>
Oops, the patch is correct, the subject isn't. It's deleting
REGISTER_NAMES.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Delete REGISTER_NAMES; Was: [patch/rfc, rfa:doco] Delete REGISTER_BYTES
2003-09-14 22:12 ` Andrew Cagney
@ 2003-09-17 19:39 ` Andrew Cagney
2003-09-18 23:57 ` Andrew Cagney
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2003-09-17 19:39 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
>> The macro's now offically dead!
>>
>> Eli, doco ok?
>>
>> I'll follow up in a few days,
>> Andrew
> Oops, the patch is correct, the subject isn't. It's deleting REGISTER_NAMES.
>
> Andrew
Just so I'm sure people know what the change is, this is with the
correct subject line :-)
I'll commit the .c part tomorrow.
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 7404 bytes --]
Index: ChangeLog
2003-09-17 Andrew Cagney <cagney@redhat.com>
* sparc-tdep.c (legacy_register_name): Delete function.
* mips-tdep.c (mips_dump_tdep): Do not print REGISTER_NAME.
(mips_gdbarch_init): Refer to MIPS_REGISTER_NAME in comments.
* infcmd.c (gdb_register_name): Delete variable.
* gdbarch.sh (SDB_REG_TO_REGNUM): Delete reference to
REGISTER_NAME and "tm.h".
* gdbarch.h, gdbarch.c: Regenerate.
* dpx2-nat.c (regmap): Refer to REGISTER_NAME and not
REGISTER_NAMES in comments.
* remote-st.c (get_reg_name), i386b-nat.c (tregmap): Ditto.
* m68klinux-nat.c (regmap): Ditto.
Index: doc/ChangeLog
2003-09-14 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Delete
documentation on REGISTER_NAMES.
Index: dpx2-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/dpx2-nat.c,v
retrieving revision 1.3
diff -u -r1.3 dpx2-nat.c
--- dpx2-nat.c 6 Mar 2001 08:21:06 -0000 1.3
+++ dpx2-nat.c 17 Sep 2003 19:34:28 -0000
@@ -32,7 +32,7 @@
#include <sys/utsname.h>
\f
-/* this table must line up with REGISTER_NAMES in tm-68k.h */
+/* This table must line up with REGISTER_NAME in "m68k-tdep.c". */
/* symbols like 'A0' come from <sys/reg.h> */
static int regmap[] =
{
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.270
diff -u -r1.270 gdbarch.sh
--- gdbarch.sh 17 Sep 2003 15:42:18 -0000 1.270
+++ gdbarch.sh 17 Sep 2003 19:34:29 -0000
@@ -463,8 +463,6 @@
# Provide a default mapping from a DWARF register number to a gdb REGNUM.
f:2:DWARF_REG_TO_REGNUM:int:dwarf_reg_to_regnum:int dwarf_regnr:dwarf_regnr:::no_op_reg_to_regnum::0
# Convert from an sdb register number to an internal gdb register number.
-# This should be defined in tm.h, if REGISTER_NAMES is not set up
-# to map one to one onto the sdb register numbers.
f:2:SDB_REG_TO_REGNUM:int:sdb_reg_to_regnum:int sdb_regnr:sdb_regnr:::no_op_reg_to_regnum::0
f:2:DWARF2_REG_TO_REGNUM:int:dwarf2_reg_to_regnum:int dwarf2_regnr:dwarf2_regnr:::no_op_reg_to_regnum::0
f::REGISTER_NAME:const char *:register_name:int regnr:regnr
Index: i386b-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386b-nat.c,v
retrieving revision 1.7
diff -u -r1.7 i386b-nat.c
--- i386b-nat.c 18 Aug 2002 17:37:17 -0000 1.7
+++ i386b-nat.c 17 Sep 2003 19:34:29 -0000
@@ -23,7 +23,7 @@
#include <machine/reg.h>
-/* this table must line up with REGISTER_NAMES in tm-i386.h */
+/* This table must line up with REGISTER_NAME in "i386-tdep.c". */
/* symbols like 'tEAX' come from <machine/reg.h> */
static int tregmap[] =
{
Index: infcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/infcmd.c,v
retrieving revision 1.89
diff -u -r1.89 infcmd.c
--- infcmd.c 16 Sep 2003 18:56:35 -0000 1.89
+++ infcmd.c 17 Sep 2003 19:34:29 -0000
@@ -1476,9 +1476,6 @@
}
\f
-#ifdef REGISTER_NAMES
-char *gdb_register_names[] = REGISTER_NAMES;
-#endif
/* Print out the machine register regnum. If regnum is -1, print all
registers (print_all == 1) or all non-float and non-vector
registers (print_all == 0).
Index: m68klinux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/m68klinux-nat.c,v
retrieving revision 1.21
diff -u -r1.21 m68klinux-nat.c
--- m68klinux-nat.c 14 Sep 2003 16:32:13 -0000 1.21
+++ m68klinux-nat.c 17 Sep 2003 19:34:29 -0000
@@ -54,7 +54,7 @@
#include "target.h"
\f
-/* This table must line up with REGISTER_NAMES in tm-m68k.h */
+/* This table must line up with REGISTER_NAME in "m68k-tdep.c". */
static const int regmap[] =
{
PT_D0, PT_D1, PT_D2, PT_D3, PT_D4, PT_D5, PT_D6, PT_D7,
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.233
diff -u -r1.233 mips-tdep.c
--- mips-tdep.c 17 Sep 2003 14:24:30 -0000 1.233
+++ mips-tdep.c 17 Sep 2003 19:34:31 -0000
@@ -6047,11 +6047,8 @@
/* MIPS version of register names. NOTE: At present the MIPS
register name management is part way between the old -
- #undef/#define REGISTER_NAMES and the new REGISTER_NAME(nr).
+ #undef/#define MIPS_REGISTER_NAMES and the new REGISTER_NAME(nr).
Further work on it is required. */
- /* NOTE: many targets (esp. embedded) do not go thru the
- gdbarch_register_name vector at all, instead bypassing it
- by defining REGISTER_NAMES. */
set_gdbarch_register_name (gdbarch, mips_register_name);
set_gdbarch_read_pc (gdbarch, mips_read_pc);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
@@ -6402,8 +6399,6 @@
fprintf_unfiltered (file,
"mips_dump_tdep: RA_REGNUM = %d\n",
RA_REGNUM);
- fprintf_unfiltered (file,
- "mips_dump_tdep: REGISTER_NAMES = delete?\n");
fprintf_unfiltered (file,
"mips_dump_tdep: ROUND_DOWN = function?\n");
fprintf_unfiltered (file,
Index: remote-st.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-st.c,v
retrieving revision 1.18
diff -u -r1.18 remote-st.c
--- remote-st.c 12 Nov 2002 21:43:55 -0000 1.18
+++ remote-st.c 17 Sep 2003 19:34:31 -0000
@@ -385,9 +385,10 @@
return inferior_ptid;
}
-/* Return the name of register number REGNO in the form input and output by
- STDEBUG. Currently, REGISTER_NAMES just happens to contain exactly what
- STDEBUG wants. Lets take advantage of that just as long as possible! */
+/* Return the name of register number REGNO in the form input and
+ output by STDEBUG. Currently, REGISTER_NAME just happens return
+ exactly what STDEBUG wants. Lets take advantage of that just as
+ long as possible! */
static char *
get_reg_name (int regno)
Index: sparc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-tdep.c,v
retrieving revision 1.127
diff -u -r1.127 sparc-tdep.c
--- sparc-tdep.c 17 Sep 2003 15:42:21 -0000 1.127
+++ sparc-tdep.c 17 Sep 2003 19:34:32 -0000
@@ -2815,24 +2815,6 @@
paddr_nz (get_frame_extra_info (fi)->fp_addr));
}
-/* MULTI_ARCH support */
-
-const char *
-legacy_register_name (int i)
-{
-#ifdef REGISTER_NAMES
- static char *names[] = REGISTER_NAMES;
- if (i < 0 || i >= (sizeof (names) / sizeof (*names)))
- return NULL;
- else
- return names[i];
-#else
- internal_error (__FILE__, __LINE__,
- "legacy_register_name: called.");
- return NULL;
-#endif
-}
-
static const char *
sparc32_register_name (int regno)
{
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.161
diff -u -r1.161 gdbint.texinfo
--- doc/gdbint.texinfo 13 Sep 2003 14:12:41 -0000 1.161
+++ doc/gdbint.texinfo 17 Sep 2003 19:34:34 -0000
@@ -3756,10 +3756,6 @@
Return the name of register @var{i} as a string. May return @code{NULL}
or @code{NUL} to indicate that register @var{i} is not valid.
-@item REGISTER_NAMES
-@findex REGISTER_NAMES
-Deprecated in favor of @code{REGISTER_NAME}.
-
@item DEPRECATED_REG_STRUCT_HAS_ADDR (@var{gcc_p}, @var{type})
@findex DEPRECATED_REG_STRUCT_HAS_ADDR
Define this to return 1 if the given type will be passed by pointer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Delete REGISTER_NAMES; Was: [patch/rfc, rfa:doco] Delete REGISTER_BYTES
2003-09-17 19:39 ` Delete REGISTER_NAMES; Was: " Andrew Cagney
@ 2003-09-18 23:57 ` Andrew Cagney
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2003-09-18 23:57 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
> Index: ChangeLog
> 2003-09-17 Andrew Cagney <cagney@redhat.com>
>
> * sparc-tdep.c (legacy_register_name): Delete function.
> * mips-tdep.c (mips_dump_tdep): Do not print REGISTER_NAME.
> (mips_gdbarch_init): Refer to MIPS_REGISTER_NAME in comments.
> * infcmd.c (gdb_register_name): Delete variable.
> * gdbarch.sh (SDB_REG_TO_REGNUM): Delete reference to
> REGISTER_NAME and "tm.h".
> * gdbarch.h, gdbarch.c: Regenerate.
> * dpx2-nat.c (regmap): Refer to REGISTER_NAME and not
> REGISTER_NAMES in comments.
> * remote-st.c (get_reg_name), i386b-nat.c (tregmap): Ditto.
> * m68klinux-nat.c (regmap): Ditto.
>
> Index: doc/ChangeLog
> 2003-09-14 Andrew Cagney <cagney@redhat.com>
>
> * gdbint.texinfo (Target Architecture Definition): Delete
> documentation on REGISTER_NAMES.
>
I've checked this in.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch/rfc, rfa:doco] Delete REGISTER_BYTES
2003-09-14 21:24 [patch/rfc, rfa:doco] Delete REGISTER_BYTES Andrew Cagney
2003-09-14 22:12 ` Andrew Cagney
@ 2003-09-21 12:38 ` Eli Zaretskii
1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2003-09-21 12:38 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
> Date: Sun, 14 Sep 2003 17:23:56 -0400
> From: Andrew Cagney <ac131313@redhat.com>
>
> The macro's now offically dead!
>
> Eli, doco ok?
Sure. A mere deletion of a removed macro/function is IMHO an obvious
change that doesn't need an approval.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-09-21 12:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-14 21:24 [patch/rfc, rfa:doco] Delete REGISTER_BYTES Andrew Cagney
2003-09-14 22:12 ` Andrew Cagney
2003-09-17 19:39 ` Delete REGISTER_NAMES; Was: " Andrew Cagney
2003-09-18 23:57 ` Andrew Cagney
2003-09-21 12:38 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox