Re: [patch/rfc] Eliminate TARGET_HAS_HARDWARE_WATCHPOINTS

Eli Zaretskii
2004-09-09T04:04:05Z

> Date: Wed, 8 Sep 2004 23:53:37 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: cagney@gnu.org, gdb-patches@sources.redhat.com
>
> > > 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.
> >
> > I don't think this kind of test can be done by compiling a program,
> > but if you have a specific test in mind, please describe it.
> >
> > In any case, if what you suggest works, I agree to replacing the macro
> > with these alternatives.
>
> There are two cases:
> - If we enabled support, GDB could not be compiled. This is amenable
> to compile tests.
> - If we enabled support, it would not work at runtime. This is
> amenable only to runtime tests - either run during configure or run
> during execution. I strongly believe the former are wrong in all
> but exceptional cases.

I understand the theory, I just don't know how to test for watchpoint
support in a program by just compiling it. If you can suggest a
program whose compilation will reveal that, please do.