This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/code+NEWS] new "set/show serial baud" command (was: "Re: Setting parity for remote serial")
- From: Doug Evans <dje at google dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Pedro Alves <palves at redhat dot com>, Yurij Grechishhev <yurij dot grechishhev at gmail dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 8 Oct 2013 19:05:03 -0700
- Subject: Re: [RFA/code+NEWS] new "set/show serial baud" command (was: "Re: Setting parity for remote serial")
- Authentication-results: sourceware.org; auth=none
- References: <CAAyhtXRSWTdpDc4jiZ2k5zWCNUXUzRxNokN1F_aRdMfuWGsBHQ at mail dot gmail dot com> <87bo6affrh dot fsf at fleche dot redhat dot com> <524ECCBB dot 5050307 at gmail dot com> <CAAyhtXQBSOz8sjxSmqGRQNtXHeOJpszMEYhRGyBydBGr-GkZCw at mail dot gmail dot com> <20131008035636 dot GC3092 at adacore dot com> <5253F497 dot 6040709 at redhat dot com> <20131008141639 dot GF3092 at adacore dot com>
On Tue, Oct 8, 2013 at 7:16 AM, Joel Brobecker <brobecker@adacore.com> wrote:
>> > I'd rather we do it right the first time. If we're a go with
>> > the "set serial baud" command, I don't mind taking care of
>> > that part. As Pedro hints, it's a fairly easy change to make.
>> >
>> > Pedro, should we go ahead? It's only been a day or two, but we haven't
>> > had any objection so far.
>>
>> Yeah, I think so.
>
> Attached is a patch that implements that.
>
> gdb/ChangeLog:
>
> * cli/cli-cmds.c (show_baud_rate): Moved to serial.c as
> serial_baud_show_cmd.
> (_initialize_cli_cmds): Delete the code creating the
> "set/show remotebaud" commands.
> * serial.c (baud_rate): Move here from top.c.
> (serial_baud_show_cmd): Move here from cli/cli-cmds.c.
> (_initialize_serial): Create "set/show serial baud" commands.
> Add "set/show remotebaud" command aliases.
> * top.c (baud_rate): Moved to serial.c.
> * NEWS: Document the new "set/show serial baud" commands,
> replacing "set/show remotebaud".
>
> Tested on x86_64-linux, with no regression (I almost expected one,
> as we used to test thhe output "help set", or soemthing like that).
>
> OK to commit?
>
> Thanks,
> --
> Joel
+ /* The commands "set/show serial baud" used to have a different name.
+ Add aliases to those names to facilitate the transition. */
+ add_alias_cmd ("remotebaud", "serial baud", no_class, 0, &setlist);
+ add_alias_cmd ("remotebaud", "serial baud", no_class, 0, &showlist);
Does the mark-as-deprecated machinery work here?