Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC] "info powerpc"
@ 2005-09-09 23:32 Paul Gilliam
  2005-09-15  0:11 ` [PATCH]*3 " Paul Gilliam
  0 siblings, 1 reply; 14+ messages in thread
From: Paul Gilliam @ 2005-09-09 23:32 UTC (permalink / raw)
  To: gdb-patches

The "Info powerpc" command has no subcommands and does nothing.

The testsuit tests "info powerpc altivec"

So, should I depreciate 'info powerpc', just get rid of it, or add the 'altivec' subcommand and just point it to 'info vector'?

-=# Paul #=-


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH]*3  Re: [RFC] "info powerpc"
  2005-09-09 23:32 [RFC] "info powerpc" Paul Gilliam
@ 2005-09-15  0:11 ` Paul Gilliam
  2005-09-15  3:34   ` Eli Zaretskii
                     ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Paul Gilliam @ 2005-09-15  0:11 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1945 bytes --]

On Friday 09 September 2005 16:33, Paul Gilliam wrote:
> The "Info powerpc" command has no subcommands and does nothing.
> 
> The testsuit tests "info powerpc altivec"
> 
> So, should I depreciate 'info powerpc', just get rid of it, or add the 'altivec' subcommand and just point it to 'info vector'?
> 
> -=# Paul #=-
> 
> 

Attached are three patches, each a different way to deal with this problem:

The first is 'easy_altivec.patch'.  It adds the "info powerpc altivec" sub-command and has it call the same
routine as "info vector" does.  The only down-side is that the routine 'vector_info' in infcmd.c has to be made global.

The second, 'altivec_alias.patch', functions like the first, except that infcmd.c is not touched.  Instead, an 'info powerpc altivec' command
is added that turns itself into an alias for "info vector" the first time it's called.  This can't be done with add_com_alias because the alias and 
the command being aliased are on different command chains.

The final patch, 'no_more_altivec.patch' depreciates the "info powerpc" command prefix and changes the testsuite to use "info vector".  To make
this work, 'lookup_cmd_composition' in cli/cli-decode.c had to be changed so that a prefix command that has no sub-commands
can be depreciated.

My personel favorite is the first one.  It does the right thing while leaving "info powerpc" useable for other sub-commands.  And it's simple.

My second favorite is the second one.  It's like the first, except only the rs6000-tdep.c file need be changed.  Well, maybe it's not so simple.

My least favorite is the third one.  While it's a clean fix to the problem, it slams the door on any future 'info powerpc' sub-commands.  It also
requires a fix so that prefix commands without any sub-commands can be depreciated.  Of course, we could just get rid of the "info powerpc"
command without depreciating it for a while first....

Let me know what you think.

-=# Paul #=-

[-- Attachment #2: easy_altivec.patch --]
[-- Type: text/x-diff, Size: 1500 bytes --]

2005-09-14  Paul Gilliam  <pgilliam@us.ibm.com>

	* infcmd.c (vector_info): Make global.
	* rs6000-tdep.c (_initialize_rs6000_tdep): Add the 'altivec' subcommand
	of 'info powerpc', pointing it to 'info vector' to do the work.

Index: infcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/infcmd.c,v
retrieving revision 1.140
diff -u -a -r1.140 infcmd.c
--- infcmd.c	17 Aug 2005 15:08:33 -0000	1.140
+++ infcmd.c	14 Sep 2005 21:52:00 -0000
@@ -1768,7 +1768,7 @@
     }
 }
 
-static void
+void
 vector_info (char *args, int from_tty)
 {
   print_vector_info (current_gdbarch, gdb_stdout, deprecated_selected_frame, args);
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.242
diff -u -a -r1.242 rs6000-tdep.c
--- rs6000-tdep.c	1 Sep 2005 18:09:41 -0000	1.242
+++ rs6000-tdep.c	14 Sep 2005 21:52:00 -0000
@@ -3409,6 +3409,7 @@
 /* Initialization code.  */
 
 extern initialize_file_ftype _initialize_rs6000_tdep; /* -Wmissing-prototypes */
+extern void vector_info (char *, int);
 
 void
 _initialize_rs6000_tdep (void)
@@ -3420,4 +3421,6 @@
   add_prefix_cmd ("powerpc", class_info, rs6000_info_powerpc_command,
 		  _("Various POWERPC info specific commands."),
 		  &info_powerpc_cmdlist, "info powerpc ", 0, &infolist);
+  add_cmd ("altivec", class_info, vector_info,_("\
+Print the status of the altivec unit.\n") , &info_powerpc_cmdlist);
 }

[-- Attachment #3: no_more_altivec.patch --]
[-- Type: text/x-diff, Size: 2546 bytes --]

2005-09-14  Paul Gilliam  <pgilliam@us.ibm.com>

	* rs6000-tdep.c (_initialize_rs6000_tdep): Mark 'info powerpc' as
	deprecated.
	* cli/cli-decode.c (lookup_cmd_composition): Only loop on the new
	prefix list if it is non-empty.
	* testsuite/gdb.arch/altivec-regs.exp ('info powerpc altivec' test):
	Changed to 'info vector'.

Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.242
diff -a -u -r1.242 rs6000-tdep.c
--- rs6000-tdep.c	1 Sep 2005 18:09:41 -0000	1.242
+++ rs6000-tdep.c	14 Sep 2005 23:27:22 -0000
@@ -3417,7 +3417,9 @@
   gdbarch_register (bfd_arch_powerpc, rs6000_gdbarch_init, rs6000_dump_tdep);
 
   /* Add root prefix command for "info powerpc" commands */
-  add_prefix_cmd ("powerpc", class_info, rs6000_info_powerpc_command,
-		  _("Various POWERPC info specific commands."),
-		  &info_powerpc_cmdlist, "info powerpc ", 0, &infolist);
+  deprecate_cmd (add_prefix_cmd ("powerpc", class_info,
+                                 rs6000_info_powerpc_command,
+		                 _("Various POWERPC info specific commands."),
+		                 &info_powerpc_cmdlist, "info powerpc ", 0,
+                                 &infolist), "info vector");
 }
Index: cli/cli-decode.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v
retrieving revision 1.55
diff -a -u -r1.55 cli-decode.c
--- cli/cli-decode.c	26 May 2005 20:49:02 -0000	1.55
+++ cli/cli-decode.c	14 Sep 2005 23:27:22 -0000
@@ -1468,10 +1468,10 @@
           }
         *prefix_cmd = prev_cmd;
       }
-      if ((*cmd)->prefixlist)
-      cur_list = *(*cmd)->prefixlist;
+      if ((*cmd)->prefixlist && *((*cmd)->prefixlist))
+        cur_list = *(*cmd)->prefixlist;
       else
-      return 1;
+        return 1;
       
       text = p;
     }
Index: testsuite/gdb.arch/altivec-regs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/altivec-regs.exp,v
retrieving revision 1.6
diff -a -u -r1.6 altivec-regs.exp
--- testsuite/gdb.arch/altivec-regs.exp	13 Sep 2005 23:13:50 -0000	1.6
+++ testsuite/gdb.arch/altivec-regs.exp	14 Sep 2005 23:27:22 -0000
@@ -140,8 +140,8 @@
          append pattern$i $vector_register
 }
 
-send_gdb "info powerpc altivec\n"
-gdb_expect_list "info powerpc altivec" ".*$gdb_prompt $" {
+send_gdb "info vector\n"
+gdb_expect_list "info vector" ".*$gdb_prompt $" {
 [$pattern0]
 [$pattern1]
 [$pattern2]

[-- Attachment #4: altivec_alias.patch --]
[-- Type: text/x-diff, Size: 2572 bytes --]

2005-09-14  Paul Gilliam  <pgilliam@us.ibm.com>

	* rs6000-tdep.c (_initialize_rs6000_tdep): Remember the cmd_list_element
	for the 'info powerpc altivec' command.
	(rs6000_info_powerpc_altivec_command): New. Replaces itself with 'info
	vector'.


Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.242
diff -u -a -r1.242 rs6000-tdep.c
--- rs6000-tdep.c	1 Sep 2005 18:09:41 -0000	1.242
+++ rs6000-tdep.c	14 Sep 2005 21:29:04 -0000
@@ -59,6 +59,8 @@
 #include "frame-unwind.h"
 #include "frame-base.h"
 
+#include "cli/cli-decode.h"
+
 #include "reggroups.h"
 
 /* If the kernel has to deliver a signal, it pushes a sigcontext
@@ -3399,6 +3401,8 @@
 }
 
 static struct cmd_list_element *info_powerpc_cmdlist = NULL;
+static char inf_vec_name[] = "vector";
+static struct cmd_list_element *inf_ppc_altivec_cmd;
 
 static void
 rs6000_info_powerpc_command (char *args, int from_tty)
@@ -3406,6 +3410,32 @@
   help_list (info_powerpc_cmdlist, "info powerpc ", class_info, gdb_stdout);
 }
 
+static void
+rs6000_info_powerpc_altivec_command (char *args, int from_tty)
+{
+  char *copied_name;
+  struct cmd_list_element *inf_vec_cmd;
+  copied_name = (char *) alloca (strlen (inf_vec_name) + 1);
+  strcpy (copied_name, inf_vec_name);
+  inf_vec_cmd = lookup_cmd (&copied_name, infolist, "", 1, 1);
+
+  if (!inf_vec_cmd) {
+    help_list (info_powerpc_cmdlist, "info powerpc ", class_info, gdb_stdout);
+    return;
+  }
+
+  /* NOTE: Both FUNC and all the FUNCTIONs need to be copied.  */
+  inf_ppc_altivec_cmd->func = inf_vec_cmd->func;
+  inf_ppc_altivec_cmd->function = inf_vec_cmd->function;
+  inf_ppc_altivec_cmd->prefixlist = inf_vec_cmd->prefixlist;
+  inf_ppc_altivec_cmd->prefixname = inf_vec_cmd->prefixname;
+  inf_ppc_altivec_cmd->allow_unknown = inf_vec_cmd->allow_unknown;
+  inf_ppc_altivec_cmd->abbrev_flag = 0;
+  inf_ppc_altivec_cmd->cmd_pointer = inf_vec_cmd;
+
+  (*inf_vec_cmd->func)(inf_vec_cmd, args, from_tty);
+}
+
 /* Initialization code.  */
 
 extern initialize_file_ftype _initialize_rs6000_tdep; /* -Wmissing-prototypes */
@@ -3420,4 +3450,7 @@
   add_prefix_cmd ("powerpc", class_info, rs6000_info_powerpc_command,
 		  _("Various POWERPC info specific commands."),
 		  &info_powerpc_cmdlist, "info powerpc ", 0, &infolist);
+  inf_ppc_altivec_cmd = add_cmd ("altivec", class_info,
+                                 rs6000_info_powerpc_altivec_command,
+                                 _("See 'info vector'"), &info_powerpc_cmdlist);
 }

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH]*3  Re: [RFC] "info powerpc"
  2005-09-15  0:11 ` [PATCH]*3 " Paul Gilliam
@ 2005-09-15  3:34   ` Eli Zaretskii
  2005-09-15 19:06     ` [DOC PATCH] " Paul Gilliam
  2005-09-15 19:18   ` Mark Kettenis
  2005-09-16 13:56   ` Daniel Jacobowitz
  2 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2005-09-15  3:34 UTC (permalink / raw)
  To: pgilliam; +Cc: gdb-patches

> From: Paul Gilliam <pgilliam@us.ibm.com>
> Date: Wed, 14 Sep 2005 17:10:39 -0700
> 
> The second, 'altivec_alias.patch', functions like the first, except that infcmd.c is not touched.  Instead, an 'info powerpc altivec' command
> is added that turns itself into an alias for "info vector" the first time it's called.  This can't be done with add_com_alias because the alias and 
> the command being aliased are on different command chains.
> 
> The final patch, 'no_more_altivec.patch' depreciates the "info powerpc" command prefix and changes the testsuite to use "info vector".  To make
> this work, 'lookup_cmd_composition' in cli/cli-decode.c had to be changed so that a prefix command that has no sub-commands
> can be depreciated.

Please accompany any changes to user-visible behavior (such as new
commands or changes in how existing command behave) with appropriate
changes to the user manual.  Thanks.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [DOC PATCH] Re: [PATCH]*3  Re: [RFC] "info powerpc"
  2005-09-15  3:34   ` Eli Zaretskii
@ 2005-09-15 19:06     ` Paul Gilliam
  2005-09-16 10:26       ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Paul Gilliam @ 2005-09-15 19:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1284 bytes --]

On Wednesday 14 September 2005 20:33, Eli Zaretskii wrote:
> > From: Paul Gilliam <pgilliam@us.ibm.com>
> > Date: Wed, 14 Sep 2005 17:10:39 -0700
> > 
> > The second, 'altivec_alias.patch', functions like the first, except that infcmd.c is not touched.  Instead, an 'info powerpc altivec' command
> > is added that turns itself into an alias for "info vector" the first time it's called.  This can't be done with add_com_alias because the alias and 
> > the command being aliased are on different command chains.
> > 
> > The final patch, 'no_more_altivec.patch' depreciates the "info powerpc" command prefix and changes the testsuite to use "info vector".  To make
> > this work, 'lookup_cmd_composition' in cli/cli-decode.c had to be changed so that a prefix command that has no sub-commands
> > can be depreciated.
> 
> Please accompany any changes to user-visible behavior (such as new
> commands or changes in how existing command behave) with appropriate
> changes to the user manual.  Thanks.
> 
> 
The "info powerpc" group of commands (all none of them) are not documented.

If we decide to just get rid of it, then no user manual changes are needed.

If we decide to keep it and make 'info powerpc altivec' an alias for "info vector", then we can use the attached doc patch.

[-- Attachment #2: doc.patch --]
[-- Type: text/x-diff, Size: 1482 bytes --]

? doc.patch
Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.278
diff -a -u -r1.278 gdb.texinfo
--- gdb.texinfo	27 Aug 2005 12:51:28 -0000	1.278
+++ gdb.texinfo	15 Sep 2005 18:27:23 -0000
@@ -4991,6 +4991,7 @@
 * Registers::                   Registers
 * Floating Point Hardware::     Floating point hardware
 * Vector Unit::                 Vector Unit
+* PowerPC Features::            PowerPC hardware features
 * OS Information::              Auxiliary data provided by operating system
 * Memory Region Attributes::    Memory region attributes
 * Dump/Restore Files::          Copy between memory and a file
@@ -6247,6 +6248,22 @@
 layout vary depending on the hardware.
 @end table
 
+@node PowerPC Features
+@section PowerPC Features
+@cindex PowerPC Features
+
+Some PowerPC chips have features that are in addition to the core functionality
+of the architecture.  Depending on the configuration, @value{GDBN} may be able
+to give you information about the status of those features.
+
+@table @code
+@kindex info powerpc altivec
+@item info powerpc altivec
+Display information about the Altivec unit.  This will consist of the contents
+of the Altivec registers @code(vr0) through @code(vr31), along with that of the
+@code(vrsave) and @code(vsrc) registers.
+@end table
+
 @node OS Information
 @section Operating system auxiliary information
 @cindex OS information

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH]*3  Re: [RFC] "info powerpc"
  2005-09-15  0:11 ` [PATCH]*3 " Paul Gilliam
  2005-09-15  3:34   ` Eli Zaretskii
@ 2005-09-15 19:18   ` Mark Kettenis
  2005-09-16 13:56   ` Daniel Jacobowitz
  2 siblings, 0 replies; 14+ messages in thread
From: Mark Kettenis @ 2005-09-15 19:18 UTC (permalink / raw)
  To: pgilliam; +Cc: gdb-patches

> From: Paul Gilliam <pgilliam@us.ibm.com>
> Date: Wed, 14 Sep 2005 17:10:39 -0700
> 
> On Friday 09 September 2005 16:33, Paul Gilliam wrote:
> > The "Info powerpc" command has no subcommands and does nothing.
> > 
> > The testsuit tests "info powerpc altivec"
> > 
> > So, should I depreciate 'info powerpc', just get rid of it, or add the 'altivec' subcommand and just point it to 'info vector'?
> > 
> > -=# Paul #=-

To be honest, from a multi-platform viewpoint, my favourite would be
to get rid of "info powerpc" completely.  But given the fact that we
let the "info powerpc altivec" test slip into the testsuite, and you
seem to like that command, I have no objection to make vector_info()
non-static; your second patch seems too much of a kludge.

Please try to get Andrew's or Kevin's approval though

Mark


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [DOC PATCH] Re: [PATCH]*3  Re: [RFC] "info powerpc"
  2005-09-15 19:06     ` [DOC PATCH] " Paul Gilliam
@ 2005-09-16 10:26       ` Eli Zaretskii
  0 siblings, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2005-09-16 10:26 UTC (permalink / raw)
  To: pgilliam; +Cc: gdb-patches

> From: Paul Gilliam <pgilliam@us.ibm.com>
> Date: Thu, 15 Sep 2005 12:06:19 -0700
> Cc: gdb-patches@sources.redhat.com
> 
> The "info powerpc" group of commands (all none of them) are not documented.

As you point out, "info powerpc" was until now a prefix with no
commands, that's why it is undocumented (or, rather, all zero of these
commands are documented ;-).

> If we decide to just get rid of it, then no user manual changes are needed.

Right; but your favorite alternative was to keep it.

> If we decide to keep it and make 'info powerpc altivec' an alias for "info vector", then we can use the attached doc patch.

Thanks; see a couple of comments below.

> Index: gdb.texinfo
> ===================================================================
> RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
> retrieving revision 1.278
> diff -a -u -r1.278 gdb.texinfo
> --- gdb.texinfo	27 Aug 2005 12:51:28 -0000	1.278
> +++ gdb.texinfo	15 Sep 2005 18:27:23 -0000
> @@ -4991,6 +4991,7 @@
>  * Registers::                   Registers
>  * Floating Point Hardware::     Floating point hardware
>  * Vector Unit::                 Vector Unit
> +* PowerPC Features::            PowerPC hardware features

I don't think this is a good place for this section.  There's already
a section on PowerPC-specific features, so we should add this
information there, I think.

> +@node PowerPC Features
> +@section PowerPC Features
> +@cindex PowerPC Features
> +
> +Some PowerPC chips have features that are in addition to the core functionality
> +of the architecture.  Depending on the configuration, @value{GDBN} may be able
> +to give you information about the status of those features.
> +
> +@table @code
> +@kindex info powerpc altivec
> +@item info powerpc altivec
> +Display information about the Altivec unit.  This will consist of the contents
> +of the Altivec registers @code(vr0) through @code(vr31), along with that of the
> +@code(vrsave) and @code(vsrc) registers.
> +@end table
> +

I think this text should have a cross-reference to the "Vector Unit"
node, since the new command essentially does the same job, right?

Finally, we need a ChangeLog entry for this change.

Other than that, this patch for the manual is approved, assuming that
the code patches are also approved.  Thanks.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH]*3  Re: [RFC] "info powerpc"
  2005-09-15  0:11 ` [PATCH]*3 " Paul Gilliam
  2005-09-15  3:34   ` Eli Zaretskii
  2005-09-15 19:18   ` Mark Kettenis
@ 2005-09-16 13:56   ` Daniel Jacobowitz
  2005-09-16 17:45     ` Kevin Buettner
  2005-09-16 18:51     ` Paul Gilliam
  2 siblings, 2 replies; 14+ messages in thread
From: Daniel Jacobowitz @ 2005-09-16 13:56 UTC (permalink / raw)
  To: Paul Gilliam; +Cc: gdb-patches

On Wed, Sep 14, 2005 at 05:10:39PM -0700, Paul Gilliam wrote:
> My least favorite is the third one.  While it's a clean fix to the
> problem, it slams the door on any future 'info powerpc' sub-commands. 
> It also requires a fix so that prefix commands without any
> sub-commands can be depreciated.  Of course, we could just get rid of
> the "info powerpc" command without depreciating it for a while
> first....

If you just remove it, you don't slam the door on anything.  We can add
it back the moment we've got a use for it.

We have a common routine for printing vector registers; I would prefer
using "info vector" instead of extending "info powerpc".

How on earth did these tests get added to the FSF sources without the
command they're testing?  Ah-hah, they didn't.  This is why repository
history and ChangeLogs are so useful.

2002-08-20  Elena Zannoni  <ezannoni@redhat.com>

        * rs6000-tdep.c (altivec_register_p): Delete.
        (rs6000_do_altivec_registers): Delete.
        (rs6000_altivec_registers_info): Delete.
        (rs6000_do_registers_info): Delete.
        (_initialize_rs6000_tdep): Remove command 'info powerpc altivec'.
        (rs6000_gdbarch_init): Remove setting of do_registers_info.

Here:
    http://sourceware.org/ml/gdb-patches/2002-08/msg00597.html

It was Elena's goal to get rid of 'info powerpc altivec'; she just
didn't update the testsuite, apparently.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH]*3  Re: [RFC] "info powerpc"
  2005-09-16 13:56   ` Daniel Jacobowitz
@ 2005-09-16 17:45     ` Kevin Buettner
  2005-09-16 18:51     ` Paul Gilliam
  1 sibling, 0 replies; 14+ messages in thread
From: Kevin Buettner @ 2005-09-16 17:45 UTC (permalink / raw)
  To: gdb-patches

On Fri, 16 Sep 2005 09:56:02 -0400
Daniel Jacobowitz <drow@false.org> wrote:

> On Wed, Sep 14, 2005 at 05:10:39PM -0700, Paul Gilliam wrote:
> > My least favorite is the third one.  While it's a clean fix to the
> > problem, it slams the door on any future 'info powerpc' sub-commands. 
> > It also requires a fix so that prefix commands without any
> > sub-commands can be depreciated.  Of course, we could just get rid of
> > the "info powerpc" command without depreciating it for a while
> > first....
> 
> If you just remove it, you don't slam the door on anything.  We can add
> it back the moment we've got a use for it.
> 
> We have a common routine for printing vector registers; I would prefer
> using "info vector" instead of extending "info powerpc".

I favor this approach as well.

Kevin


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH]*3  Re: [RFC] "info powerpc"
  2005-09-16 13:56   ` Daniel Jacobowitz
  2005-09-16 17:45     ` Kevin Buettner
@ 2005-09-16 18:51     ` Paul Gilliam
  2005-09-16 19:40       ` Mark Kettenis
  2005-09-16 19:47       ` Kevin Buettner
  1 sibling, 2 replies; 14+ messages in thread
From: Paul Gilliam @ 2005-09-16 18:51 UTC (permalink / raw)
  To: gdb-patches

Ok, I agree.

Door 3 it is:  Do I need anymore more approvals to commit?

-=# Paul #=-

On Friday 16 September 2005 06:56, Daniel Jacobowitz wrote:
> On Wed, Sep 14, 2005 at 05:10:39PM -0700, Paul Gilliam wrote:
> > My least favorite is the third one.  While it's a clean fix to the
> > problem, it slams the door on any future 'info powerpc' sub-commands. 
> > It also requires a fix so that prefix commands without any
> > sub-commands can be depreciated.  Of course, we could just get rid of
> > the "info powerpc" command without depreciating it for a while
> > first....
> 
> If you just remove it, you don't slam the door on anything.  We can add
> it back the moment we've got a use for it.
> 
> We have a common routine for printing vector registers; I would prefer
> using "info vector" instead of extending "info powerpc".
> 
> How on earth did these tests get added to the FSF sources without the
> command they're testing?  Ah-hah, they didn't.  This is why repository
> history and ChangeLogs are so useful.
> 
> 2002-08-20  Elena Zannoni  <ezannoni@redhat.com>
> 
>         * rs6000-tdep.c (altivec_register_p): Delete.
>         (rs6000_do_altivec_registers): Delete.
>         (rs6000_altivec_registers_info): Delete.
>         (rs6000_do_registers_info): Delete.
>         (_initialize_rs6000_tdep): Remove command 'info powerpc altivec'.
>         (rs6000_gdbarch_init): Remove setting of do_registers_info.
> 
> Here:
>     http://sourceware.org/ml/gdb-patches/2002-08/msg00597.html
> 
> It was Elena's goal to get rid of 'info powerpc altivec'; she just
> didn't update the testsuite, apparently.
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH]*3  Re: [RFC] "info powerpc"
  2005-09-16 18:51     ` Paul Gilliam
@ 2005-09-16 19:40       ` Mark Kettenis
  2005-09-16 19:47       ` Kevin Buettner
  1 sibling, 0 replies; 14+ messages in thread
From: Mark Kettenis @ 2005-09-16 19:40 UTC (permalink / raw)
  To: pgilliam; +Cc: gdb-patches

> From: Paul Gilliam <pgilliam@us.ibm.com>
> Date: Fri, 16 Sep 2005 11:50:12 -0700
> 
> Ok, I agree.
> 
> Door 3 it is:  Do I need anymore more approvals to commit?

Well, I think it is silly to deprecate a command *prefix* (of course
it was silly to have that command prefix in the first place).  So I'd
propose simply removing that code instead of adding code to
cli/cli-decode.c to allow such a silly deprecated empty prefix.

Mark


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH]*3  Re: [RFC] "info powerpc"
  2005-09-16 18:51     ` Paul Gilliam
  2005-09-16 19:40       ` Mark Kettenis
@ 2005-09-16 19:47       ` Kevin Buettner
  2005-09-19 17:50         ` [commit] "get rid of info powerpc" Paul Gilliam
  1 sibling, 1 reply; 14+ messages in thread
From: Kevin Buettner @ 2005-09-16 19:47 UTC (permalink / raw)
  To: gdb-patches

On Fri, 16 Sep 2005 11:50:12 -0700
Paul Gilliam <pgilliam@us.ibm.com> wrote:

> Ok, I agree.
> 
> Door 3 it is:  Do I need anymore more approvals to commit?

If I'm not mistaken, Daniel suggested just removing the "info powerpc"
command.  Your no_more_altivec.patch does a bit more than this in that
it deprecates this command as well.

I'm comfortable with a patch that removes the "info powerpc" command
and updates the testsuite to use "info vector".  Consider such a patch
as preapproved.  (But do post it to the list after committing it.)

Thanks!

Kevin


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [commit] "get rid of info powerpc"
  2005-09-16 19:47       ` Kevin Buettner
@ 2005-09-19 17:50         ` Paul Gilliam
  2005-09-19 18:09           ` Daniel Jacobowitz
  0 siblings, 1 reply; 14+ messages in thread
From: Paul Gilliam @ 2005-09-19 17:50 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1098 bytes --]

Attached is the patch I committed.  It just gets rid of the 'info powerpc' command prefix and patches the test
to use 'info vector' instead.

One question though:  I made an entry in the src/gdb/ChangeLog for the change to src/rs6000-tdep.c and one
in the src/gdb/testsuite/ChangeLog for for the change to altivec-regs.exp.  Was that the right way to do it?
Should I just have made one ChangeLog entry in src/gdb/ChangeLog?

-=# Paul #=-

On Friday 16 September 2005 12:47, Kevin Buettner wrote:
> On Fri, 16 Sep 2005 11:50:12 -0700
> Paul Gilliam <pgilliam@us.ibm.com> wrote:
> 
> > Ok, I agree.
> > 
> > Door 3 it is:  Do I need anymore more approvals to commit?
> 
> If I'm not mistaken, Daniel suggested just removing the "info powerpc"
> command.  Your no_more_altivec.patch does a bit more than this in that
> it deprecates this command as well.
> 
> I'm comfortable with a patch that removes the "info powerpc" command
> and updates the testsuite to use "info vector".  Consider such a patch
> as preapproved.  (But do post it to the list after committing it.)
> 
> Thanks!
> 
> Kevin
> 
> 

[-- Attachment #2: elide_info_powerpc.patch --]
[-- Type: text/x-diff, Size: 1655 bytes --]

2005-09-19  Paul Gilliam  <pgilliam@us.ibm.com>

	* rs6000-tdep.c (_initialize_rs6000_tdep): Get rid of the unused
	'info powerpc' command prefix.
	* gdb.arch/altivec-regs.exp (info powerpc altivec): Replace the 'info
	powerpc altivec' test with an almost identical 'info vector' test.

Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.242
diff -a -u -r1.242 rs6000-tdep.c
--- rs6000-tdep.c	1 Sep 2005 18:09:41 -0000	1.242
+++ rs6000-tdep.c	19 Sep 2005 17:11:10 -0000
@@ -3415,9 +3415,4 @@
 {
   gdbarch_register (bfd_arch_rs6000, rs6000_gdbarch_init, rs6000_dump_tdep);
   gdbarch_register (bfd_arch_powerpc, rs6000_gdbarch_init, rs6000_dump_tdep);
-
-  /* Add root prefix command for "info powerpc" commands */
-  add_prefix_cmd ("powerpc", class_info, rs6000_info_powerpc_command,
-		  _("Various POWERPC info specific commands."),
-		  &info_powerpc_cmdlist, "info powerpc ", 0, &infolist);
 }
Index: testsuite/gdb.arch/altivec-regs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/altivec-regs.exp,v
retrieving revision 1.6
diff -a -u -r1.6 altivec-regs.exp
--- testsuite/gdb.arch/altivec-regs.exp	13 Sep 2005 23:13:50 -0000	1.6
+++ testsuite/gdb.arch/altivec-regs.exp	19 Sep 2005 17:11:10 -0000
@@ -140,8 +140,8 @@
          append pattern$i $vector_register
 }
 
-send_gdb "info powerpc altivec\n"
-gdb_expect_list "info powerpc altivec" ".*$gdb_prompt $" {
+send_gdb "info vector\n"
+gdb_expect_list "info vector" ".*$gdb_prompt $" {
 [$pattern0]
 [$pattern1]
 [$pattern2]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [commit] "get rid of info powerpc"
  2005-09-19 17:50         ` [commit] "get rid of info powerpc" Paul Gilliam
@ 2005-09-19 18:09           ` Daniel Jacobowitz
  2005-09-20 20:05             ` Paul Gilliam
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel Jacobowitz @ 2005-09-19 18:09 UTC (permalink / raw)
  To: Paul Gilliam; +Cc: gdb-patches

On Mon, Sep 19, 2005 at 10:49:15AM -0700, Paul Gilliam wrote:
> Attached is the patch I committed.  It just gets rid of the 'info
> powerpc' command prefix and patches the test to use 'info vector'
> instead.

Thanks.

> One question though:  I made an entry in the src/gdb/ChangeLog for
> the change to src/rs6000-tdep.c and one in the
> src/gdb/testsuite/ChangeLog for for the change to altivec-regs.exp. 
> Was that the right way to do it? Should I just have made one
> ChangeLog entry in src/gdb/ChangeLog?

No, that's correct.

I noticed that you didn't update the copyright dates for the Altivec
tests when you started changing them earlier this year, so I've also
committed the attached.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

2005-09-19  Daniel Jacobowitz  <dan@codesourcery.com>

	* gdb.arch/altivec-regs.exp, gdb.arch/altivec-abi.exp: Update
	copyright dates.

Index: gdb.arch/altivec-abi.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/altivec-abi.exp,v
retrieving revision 1.5
diff -u -p -r1.5 altivec-abi.exp
--- gdb.arch/altivec-abi.exp	3 May 2005 00:41:48 -0000	1.5
+++ gdb.arch/altivec-abi.exp	19 Sep 2005 18:07:58 -0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 #
 # 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
Index: gdb.arch/altivec-regs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/altivec-regs.exp,v
retrieving revision 1.7
diff -u -p -r1.7 altivec-regs.exp
--- gdb.arch/altivec-regs.exp	19 Sep 2005 17:38:04 -0000	1.7
+++ gdb.arch/altivec-regs.exp	19 Sep 2005 18:07:58 -0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 # 
 # 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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [commit] "get rid of info powerpc"
  2005-09-19 18:09           ` Daniel Jacobowitz
@ 2005-09-20 20:05             ` Paul Gilliam
  0 siblings, 0 replies; 14+ messages in thread
From: Paul Gilliam @ 2005-09-20 20:05 UTC (permalink / raw)
  To: gdb-patches; +Cc: Daniel Jacobowitz

On Monday 19 September 2005 11:09, Daniel Jacobowitz wrote:
> On Mon, Sep 19, 2005 at 10:49:15AM -0700, Paul Gilliam wrote:
> > Attached is the patch I committed.  It just gets rid of the 'info
> > powerpc' command prefix and patches the test to use 'info vector'
> > instead.
> 
> Thanks.
> 
> > One question though:  I made an entry in the src/gdb/ChangeLog for
> > the change to src/rs6000-tdep.c and one in the
> > src/gdb/testsuite/ChangeLog for for the change to altivec-regs.exp. 
> > Was that the right way to do it? Should I just have made one
> > ChangeLog entry in src/gdb/ChangeLog?
> 
> No, that's correct.
> 
> I noticed that you didn't update the copyright dates for the Altivec
> tests when you started changing them earlier this year, so I've also
> committed the attached.
> 

Great!  I'll be more carefull about copyright dates.

-=# Paul #=-


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2005-09-20 20:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-09 23:32 [RFC] "info powerpc" Paul Gilliam
2005-09-15  0:11 ` [PATCH]*3 " Paul Gilliam
2005-09-15  3:34   ` Eli Zaretskii
2005-09-15 19:06     ` [DOC PATCH] " Paul Gilliam
2005-09-16 10:26       ` Eli Zaretskii
2005-09-15 19:18   ` Mark Kettenis
2005-09-16 13:56   ` Daniel Jacobowitz
2005-09-16 17:45     ` Kevin Buettner
2005-09-16 18:51     ` Paul Gilliam
2005-09-16 19:40       ` Mark Kettenis
2005-09-16 19:47       ` Kevin Buettner
2005-09-19 17:50         ` [commit] "get rid of info powerpc" Paul Gilliam
2005-09-19 18:09           ` Daniel Jacobowitz
2005-09-20 20:05             ` Paul Gilliam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox