Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: muller@ics.u-strasbg.fr (Pierre Muller)
Cc: eliz@gnu.org ('Eli Zaretskii'),
	gdb-patches@sourceware.org,         pedro@codesourcery.com
Subject: Re: [RFC] Remove i386 low level debug register function from nm- header file.
Date: Tue, 12 May 2009 16:06:00 -0000	[thread overview]
Message-ID: <200905121606.n4CG6Kgx029225@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <004601c9d318$a13c4fd0$e3b4ef70$@u-strasbg.fr> from "Pierre Muller" at May 12, 2009 05:45:09 PM

Pierre Muller wrote:

> What about something like this:
> (once my main patch is accepted)
> 
> static void
> maint_show_debug_regs (char * args, int from_tty)
> {
>   if (i386_dr_low.set_addr && i386_dr_low.get_status &&
> i386_dr_low.set_control)
>     {
>     }
>   else
>     {
>       error (_("x86 debug register cannot be used for that target"));
>     }
> }
> 
> void
> _initialize_i386_nat (void)
> {
> #ifdef I386_USE_GENERIC_WATCHPOINTS
>   /* A maintenance command to enable printing the internal DRi mirror
>      variables.  */
>   add_cmd ("show-debug-regs", class_maintenance,
>            maint_show_debug_regs, _("\
> Set whether to show variables that mirror the x86 debug registers.\n\
> 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);
> #endif

Well, I guess a simpler way to have that effect would be to just
move installing the command into the i386_use_watchpoints routine;
on targets that do not use watchpoints the command then simply would
not be available, just as it is the case today.

> This would also remove one of the ARI var_boolean warnings!

You're right, but we should be using one of the new routines (probably
add_setshow_boolean_cmd) instead of the old deprecated_add_set_cmd.
That's a separate issue though.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2009-05-12 16:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-10 14:54 Pierre Muller
2009-05-10 17:37 ` Eli Zaretskii
2009-05-12 13:02 ` Ulrich Weigand
2009-05-12 14:37   ` Pierre Muller
2009-05-12 15:00     ` Ulrich Weigand
2009-05-12 15:17       ` Eli Zaretskii
2009-05-12 15:45         ` Pierre Muller
2009-05-12 16:06           ` Ulrich Weigand [this message]
2009-05-12 16:19             ` Pedro Alves
2009-05-12 21:28     ` [RFC-v2] " Pierre Muller
2009-05-13 15:33       ` Ulrich Weigand
2009-05-13 18:09         ` Eli Zaretskii
2009-05-13 18:35           ` Ulrich Weigand
2009-05-13 18:25         ` Doug Evans
2009-05-13 18:38           ` Ulrich Weigand
2009-05-13 22:21           ` Pierre Muller
2009-05-13 23:16             ` Doug Evans
2009-05-13 23:39         ` [RFA-v3] " Pierre Muller
2009-05-14  9:06           ` Ulrich Weigand
2009-05-14  9:10             ` Joel Brobecker
2009-05-14  9:40             ` Pierre Muller
2009-05-14 15:32             ` Macros in config files Pierre Muller
2009-05-14 18:31               ` Ulrich Weigand

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=200905121606.n4CG6Kgx029225@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=muller@ics.u-strasbg.fr \
    --cc=pedro@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