Re: [patch/rfc] Eliminate TARGET_HAS_HARDWARE_WATCHPOINTS

Daniel Jacobowitz
2004-09-08T15:23:15Z

On Wed, Sep 08, 2004 at 06:17:38PM +0300, Eli Zaretskii wrote:
> > Date: Wed, 08 Sep 2004 10:28:26 -0400
> > From: Andrew Cagney <cagney@gnu.org>
> > Cc: gdb-patches@sources.redhat.com
> >
> > Can you give an example - a target with no watchpoint support that no
> > longer builds due to my patch?
>
> I don't think it is my job to find such a target. Rather, it is up to
> you to prove that no target will ever need that.
>
> Anyway, I don't think this kind of approach to our argument is
> productive. I suggest that we instead concentrate on finding an
> alternative machinery to compute TARGET_HAS_HARDWARE_WATCHPOINTS at
> configure time.
>
> How about this: for a cross-compiled build or for remote targets, add
> a switch to the configure script, say --without-hw-watchpoints, that
> will set TARGET_HAS_HARDWARE_WATCHPOINTS so as to disable hardware
> watchpoint support; for native and non-cross builds, add an autoconf
> test that will do that automatically?

Why should the macro matter for remote targets? We should ask the
target whether watchpoints are available.

For cross-compiled build, autoconf should work just fine. Compile
tests are still available and you shouldn't be using run tests for this
sort of thing anyway.

--
Daniel Jacobowitz