From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31104 invoked by alias); 14 May 2009 14:37:31 -0000 Received: (qmail 31095 invoked by uid 22791); 14 May 2009 14:37:29 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.152) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 May 2009 14:37:24 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.2/jtpda-5.5pre1) with ESMTP id n4EEaq6K059239 ; Thu, 14 May 2009 16:36:52 +0200 (CEST) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [IPv6:2001:660:2402:d::10]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id n4EEapl9085184 ; Thu, 14 May 2009 16:36:51 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) Received: from d620muller (www-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id n4EEao64052355 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Thu, 14 May 2009 16:36:50 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller" To: "'Pedro Alves'" , , "'Eli Zaretskii'" Cc: , , References: <200812310114.45103.pedro@codesourcery.com> <200901072133.56889.pedro@codesourcery.com> <200905121810.50876.pedro@codesourcery.com> In-Reply-To: <200905121810.50876.pedro@codesourcery.com> Subject: RE: eliminate deprecated_add_set_cmd Date: Thu, 14 May 2009 14:37:00 -0000 Message-ID: <001001c9d4a1$70104f30$5030ed90$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-05/txt/msg00302.txt.bz2 As I follow-up to this patch, I move the var_boolean rule in the A.R.Index to ari_regression. Pierre as ARI stuff "maintainer". > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Pedro Alves > Envoy=E9=A0: Tuesday, May 12, 2009 7:11 PM > =C0=A0: gdb-patches@sourceware.org; Eli Zaretskii > Cc=A0: tschwinge@gnu.org; brobecker@adacore.com; ams@gnu.org > Objet=A0: Re: eliminate deprecated_add_set_cmd >=20 > Hi guys, I apologise for the delay in getting back to this. >=20 > On Friday 09 January 2009 14:09:26, Eli Zaretskii wrote: > > > From: Pedro Alves > > > Date: Wed, 7 Jan 2009 21:33:56 +0000 > > > Cc: Thomas Schwinge , Joel Brobecker > , Eli Zaretskii , ams@gnu.org > > > > > > Eli, are the doco bits OK? > > >=20 > The patch at the bottom is now checked in. I've managed to bork > up my debian/Hurd VM (*), and I don't remember if I ever build this > patch on the Hurd. :-/ I apologise if this breaks anything, but it > should be trivial/obvious to fix if so. :-) >=20 > * - hint: don't apt-get dist-upgrade with no drive space left! >=20 > > Yes, but I think the change in show-debug-regs warrants an entry in > > NEWS. >=20 > How's this? >=20 > * NEWS: Mention that the `maint show-debug-registers' and > `gnu-debug' commands were renamed to `maint set > show-debug-registers' and `set debug gnu-nat' respectivelly. >=20 > --- > gdb/NEWS | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) >=20 > Index: src/gdb/NEWS > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- src.orig/gdb/NEWS 2009-05-12 17:51:36.000000000 +0100 > +++ src/gdb/NEWS 2009-05-12 18:03:34.000000000 +0100 > @@ -300,6 +300,20 @@ show tcp connect-timeout > with a specified timeout period; this is useful if the stub is > launched > in parallel with GDB but may not be ready to accept connections > immediately. >=20 > +maint set show-debug-registers (on|off) > +maint show show-debug-registers > + The `maint show-debug-registers' command found in previous versions > + of GDB has been renamed `maint set show-debug-registers' for > + consistency with other commands, and `maint show > + show-debug-registers' has been added. > + > +set debug gnu-nat (on|off) > +show debug gnu-nat > + The previously undocumented `gnu-debug' command has been renamed > + `set debug gnu-nat' for consistency with other commands, and `show > + debug gnu-nat' has been added. These commands allow turning on or > + off debugging messages from the GNU Hurd debug support. > + > * New native configurations >=20 > x86/x86_64 Darwin i[34567]86-*-darwin* >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > This is what I've already applied: >=20 > 2009-05-12 Pedro Alves >=20 > * cli/cli-decode.c (deprecated_add_set_cmd): Delete. > * command.h (deprecated_add_set_cmd): Delete declaration. > * gnu-nat.c (_initialize_gnu_nat): Replace 'maint gnu-debug' with > 'set debug gnu-nat' and 'show debug gnu-nat'. > * i386-nat.c (_initialize_i386_nat): Replace 'maint > show-debug-registers' with 'maint set show-debug-registers' and > 'maint show show-debug-registers'. > * mips-linux-nat.c (_initialize_mips_linux_nat): Replace 'maint > show-debug-registers' with 'maint set show-debug-registers' and > 'maint show show-debug-registers'. >=20 > 2009-05-12 Pedro Alves >=20 > * gdb.texinfo: Document 'set/show debug gnu-nat'. Replace 'maint > show-debug-regs' docs by 'maint set show-debug-regs' and 'maint > show show-debug-regs' docs. >=20 > --- > gdb/cli/cli-decode.c | 11 ----------- > gdb/command.h | 10 ---------- > gdb/doc/gdb.texinfo | 11 +++++++++-- > gdb/gnu-nat.c | 13 +++++++++---- > gdb/i386-nat.c | 12 ++++++++---- > gdb/mips-linux-nat.c | 13 ++++++++----- > 6 files changed, 34 insertions(+), 36 deletions(-) >=20 > Index: src/gdb/cli/cli-decode.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- src.orig/gdb/cli/cli-decode.c 2009-03-25 21:42:34.000000000 +0000 > +++ src/gdb/cli/cli-decode.c 2009-05-12 17:22:14.000000000 +0100 > @@ -397,17 +397,6 @@ add_setshow_cmd_full (char *name, > *show_result =3D show; > } >=20 > -struct cmd_list_element * > -deprecated_add_set_cmd (char *name, > - enum command_class class, > - var_types var_type, > - void *var, > - char *doc, > - struct cmd_list_element **list) > -{ > - return add_set_or_show_cmd (name, set_cmd, class, var_type, var, > doc, list); > -} > - > /* Add element named NAME to command list LIST (the list for set or > some sublist thereof). CLASS is as in add_cmd. ENUMLIST is a list > of strings which may follow NAME. VAR is address of the variable > Index: src/gdb/command.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- src.orig/gdb/command.h 2009-02-06 21:33:58.000000000 +0000 > +++ src/gdb/command.h 2009-05-12 17:22:14.000000000 +0100 > @@ -205,16 +205,6 @@ extern void help_list (struct cmd_list_e > extern void help_cmd_list (struct cmd_list_element *, enum > command_class, > char *, int, struct ui_file *); >=20 > -/* NOTE: cagney/2005-02-21: Since every set command should be paired > - with a corresponding show command (i.e., add_setshow_*) this call > - should not be needed. Unfortunatly some are not (e.g., > - "maintenance ") and those need to be fixed. */ > -extern struct cmd_list_element *deprecated_add_set_cmd (char *name, > enum > - command_class class, > - var_types var_type, void > *var, > - char *doc, > - struct cmd_list_element > **list); > - > /* Method for show a set/show variable's VALUE on FILE. If this > method isn't supplied deprecated_show_value_hack() is called (which > is not good). */ > Index: src/gdb/gnu-nat.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- src.orig/gdb/gnu-nat.c 2009-04-19 18:17:08.000000000 +0100 > +++ src/gdb/gnu-nat.c 2009-05-12 17:22:14.000000000 +0100 > @@ -3410,10 +3410,15 @@ _initialize_gnu_nat (void) >=20 > add_task_commands (); > add_thread_commands (); > - deprecated_add_set_cmd ("gnu-debug", class_maintenance, > - var_boolean, (char *) &gnu_debug_flag, > - "Set debugging output for the gnu backend.", > - &maintenancelist); > + add_setshow_boolean_cmd ("gnu-nat", class_maintenance, > + &gnu_debug_flag, > + _("Set debugging output for the gnu backend."), > + _("Show debugging output for the gnu backend."), > + NULL, > + NULL, > + NULL, > + &setdebuglist, > + &showdebuglist); > } >=20=20 > #ifdef FLUSH_INFERIOR_CACHE > Index: src/gdb/i386-nat.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- src.orig/gdb/i386-nat.c 2009-04-30 11:39:38.000000000 +0100 > +++ src/gdb/i386-nat.c 2009-05-12 17:22:14.000000000 +0100 > @@ -700,13 +700,17 @@ _initialize_i386_nat (void) > #ifdef I386_USE_GENERIC_WATCHPOINTS > /* A maintenance command to enable printing the internal DRi mirror > variables. */ > - deprecated_add_set_cmd ("show-debug-regs", class_maintenance, > - var_boolean, (char *) &maint_show_dr, _("\ > -Set whether to show variables that mirror the x86 debug registers.\n\ > + add_setshow_boolean_cmd ("show-debug-regs", class_maintenance, > + &maint_show_dr, _("\ > +Set whether to show variables that mirror the x86 debug registers."), > _("\ > +Show whether to show variables that mirror the x86 debug registers."), > _("\ > Use \"on\" to enable, \"off\" to disable.\n\ > If enabled, the debug registers values are shown when GDB inserts\n\ > or removes a hardware breakpoint or watchpoint, and when the > inferior\n\ > triggers a breakpoint or watchpoint."), > - &maintenancelist); > + NULL, > + NULL, > + &maintenance_set_cmdlist, > + &maintenance_show_cmdlist); > #endif > } > Index: src/gdb/doc/gdb.texinfo > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- src.orig/gdb/doc/gdb.texinfo 2009-05-04 10:51:47.000000000 +0100 > +++ src/gdb/doc/gdb.texinfo 2009-05-12 17:23:28.000000000 +0100 > @@ -17817,6 +17817,11 @@ default is off. > @item show debug frame > Displays the current state of displaying @value{GDBN} frame debugging > info. > +@item set debug gnu-nat > +@cindex @sc{gnu}/Hurd debug messages > +Turns on or off debugging messages from the @sc{gnu}/Hurd debug > support. > +@item show debug gnu-nat > +Show the current state of @sc{gnu}/Hurd debugging messages. > @item set debug infrun > @cindex inferior debugging info > Turns on or off display of @value{GDBN} debugging info for running the > inferior. > @@ -25935,9 +25940,11 @@ data in a @file{gmon.out} file, be sure > Configuring with @samp{--enable-profiling} arranges for @value{GDBN} > to be > compiled with the @samp{-pg} compiler option. >=20 > -@kindex maint show-debug-regs > +@kindex maint set show-debug-regs > +@kindex maint show show-debug-regs > @cindex hardware debug registers > -@item maint show-debug-regs > +@item maint set show-debug-regs > +@itemx maint show show-debug-regs > Control whether to show variables that mirror the hardware debug > registers. Use @code{ON} to enable, @code{OFF} to disable. If > enabled, the debug registers values are shown when @value{GDBN} > inserts or > Index: src/gdb/mips-linux-nat.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- src.orig/gdb/mips-linux-nat.c 2009-05-12 17:35:13.000000000 +0100 > +++ src/gdb/mips-linux-nat.c 2009-05-12 17:36:36.000000000 +0100 > @@ -1044,15 +1044,18 @@ _initialize_mips_linux_nat (void) > { > struct target_ops *t; >=20 > - deprecated_add_set_cmd ("show-debug-regs", class_maintenance, > - var_boolean, (char *) &maint_show_dr, _("\ > -Set whether to show variables that mirror the mips debug registers.\n\ > + add_setshow_boolean_cmd ("show-debug-regs", class_maintenance, > + &maint_show_dr, _("\ > +Set whether to show variables that mirror the mips debug registers."), > _("\ > +Show whether to show variables that mirror the mips debug > registers."), _("\ > Use \"on\" to enable, \"off\" to disable.\n\ > If enabled, the debug registers values are shown when GDB inserts\n\ > or removes a hardware breakpoint or watchpoint, and when the > inferior\n\ > triggers a breakpoint or watchpoint."), > - &maintenancelist); > - > + NULL, > + NULL, > + &maintenance_set_cmdlist, > + &maintenance_show_cmdlist); >=20 > t =3D linux_trad_target (mips_linux_register_u_offset); >=20