From: Joel Brobecker <brobecker@adacore.com>
To: Thomas Schwinge <thomas@codesourcery.com>
Cc: gdb-patches@sourceware.org, Kevin Buettner <kevinb@redhat.com>,
"Maciej W. Rozycki" <macro@codesourcery.com>
Subject: Re: [SH] regs command
Date: Wed, 16 May 2012 16:58:00 -0000 [thread overview]
Message-ID: <20120516165730.GY10253@adacore.com> (raw)
In-Reply-To: <87zk98qe8t.fsf@schwinge.name>
> Sounds good, and thusly implemented, OK to commit?
I have only skimmed the patch for now. Perhaps Kevin would like
to look at the purely sh-related changes. They look good to me,
but I don't know if you might have missed something.
> gdb/
> * sh-tdep.c (sh_show_regs): Remove variable.
> (sh_generic_show_regs, sh3_show_regs, sh2e_show_regs, sh2a_show_regs)
> (sh2a_nofpu_show_regs, sh3e_show_regs, sh3_dsp_show_regs)
> (sh4_show_regs, sh4_nofpu_show_regs, sh_dsp_show_regs)
> (sh_show_regs_command): Remove functions.
> (sh_gdbarch_init): Don't set sh_show_regs.
> (_initialize_sh_tdep): Make the `regs' command an deprecated alias to
> `info all-registers'.
> * sh64-tdep.c (sh64_show_media_regs, sh64_show_compact_regs)
> (sh64_show_regs): Remove functions.
> * sh64-tdep.h (sh64_show_regs): Remove function declaration.
> * NEWS: Document the deprecation.
> gdb/doc/
> * gdb.texinfo: Document the deprecation.
In the meantime, I have noticed something:
> _initialize_sh_tdep (void)
> {
> struct cmd_list_element *c;
> + extern void all_registers_info (char *, int);
>
> gdbarch_register (bfd_arch_sh, sh_gdbarch_init, NULL);
>
> - add_com ("regs", class_vars, sh_show_regs_command, _("Print all registers"));
> -
> + c = add_com ("regs", class_vars, all_registers_info,
> + _("Print all registers"));
> + deprecate_cmd (c, "info all-registers");
> +
Can you use add_alias_cmd instead of add_com? The only think I am not
sure about is whether it is going to work with the deprecation mechanism.
The command system is kind of obscure to me (in the fact that it has so
many attributes), but a look at the code seems to indicate that it will.
And as a bonus, you'll inherit all the attributes of the "info all-reg"
command...
--
Joel
next prev parent reply other threads:[~2012-05-16 16:58 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-16 13:56 Thomas Schwinge
2012-05-16 14:26 ` Joel Brobecker
2012-05-16 16:32 ` Thomas Schwinge
2012-05-16 16:58 ` Joel Brobecker [this message]
2012-05-16 17:21 ` Thomas Schwinge
2012-05-16 18:47 ` Tom Tromey
2012-05-16 19:06 ` Joel Brobecker
2012-05-16 19:38 ` Maciej W. Rozycki
2012-05-17 0:59 ` Maciej W. Rozycki
2012-05-17 11:10 ` Mark Kettenis
2012-05-17 11:23 ` Maciej W. Rozycki
2012-05-17 12:38 ` Joel Brobecker
2012-05-17 15:23 ` Mark Kettenis
2012-05-17 15:45 ` Joel Brobecker
2012-05-17 19:52 ` Tom Tromey
2012-05-17 20:38 ` Joel Brobecker
2012-05-18 12:23 ` Maciej W. Rozycki
2012-05-18 12:39 ` Pedro Alves
2012-05-18 12:49 ` Joel Brobecker
2012-05-18 13:33 ` Pedro Alves
2012-05-18 13:47 ` Tom Tromey
2012-05-21 23:36 ` Maciej W. Rozycki
2012-05-24 18:05 ` Tom Tromey
2012-05-17 19:32 ` Kevin Buettner
2012-05-16 18:36 ` Tom Tromey
2012-05-16 18:36 ` Pedro Alves
2012-05-16 19:36 ` Eli Zaretskii
2012-06-06 18:10 ` Thomas Schwinge
2012-08-10 9:22 ` Thomas Schwinge
2012-08-10 16:20 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120516165730.GY10253@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@redhat.com \
--cc=macro@codesourcery.com \
--cc=thomas@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox