This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Remove i386 low level debug register function from nm- header file.
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: muller at ics dot u-strasbg dot fr, gdb-patches at sourceware dot org, pedro at codesourcery dot com
- Date: Tue, 12 May 2009 18:16:04 +0300
- Subject: Re: [RFC] Remove i386 low level debug register function from nm- header file.
- References: <200905121500.n4CF0Z1B016661@d12av02.megacenter.de.ibm.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Tue, 12 May 2009 17:00:35 +0200 (CEST)
> From: "Ulrich Weigand" <uweigand@de.ibm.com>
> Cc: gdb-patches@sourceware.org, pedro@codesourcery.com ('Pedro Alves'),
> eliz@gnu.org ('Eli Zaretskii')
>
> > > I think you should provide everything in i386-nat.c (and
> > > the new i386-nat.h) unconditionally, and eliminate the
> > > various definitions of I386_USE_GENERIC_WATCHPOINTS in the
> > > nm- header files.
> >
> > The only drawback is that "maint show-debug--regs" command
> > will then also appear on target that do not support
> > debug registers... Anyhow, it will just be a no-op in that case.
> > Is that a problem?
>
> I don't think so. The command simply says: "whenever the hardware
> debug registers are changed, display their contents". Being able
> to set that flag on a system that happens to never use hardware
> debug register should be fine, the condition just never occurs.
I'd rather we displayed an error message when this command is used on
platforms where it has no effect. Silently doing nothing is not a
good UI. But that's me.