From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23731 invoked by alias); 9 Sep 2004 12:47:53 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 23722 invoked from network); 9 Sep 2004 12:47:51 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 9 Sep 2004 12:47:51 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1C5OLE-0002Fb-Bf; Thu, 09 Sep 2004 08:47:56 -0400 Date: Thu, 09 Sep 2004 12:47:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: cagney@gnu.org, gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] Eliminate TARGET_HAS_HARDWARE_WATCHPOINTS Message-ID: <20040909124755.GA8559@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , cagney@gnu.org, gdb-patches@sources.redhat.com References: <413C6E8E.6030607@gnu.org> <01c49441$Blat.v2.2.2$ead61420@zahav.net.il> <413E25F6.7020908@gnu.org> <01c49557$Blat.v2.2.2$23f700a0@zahav.net.il> <413F170A.2070005@gnu.org> <01c495b7$Blat.v2.2.2$1f83c660@zahav.net.il> <20040908152315.GA28927@nevyn.them.org> <01c4961e$Blat.v2.2.2$d00fd3e0@zahav.net.il> <20040909035336.GA30215@nevyn.them.org> <01c49621$Blat.v2.2.2$eb2d05a0@zahav.net.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01c49621$Blat.v2.2.2$eb2d05a0@zahav.net.il> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-09/txt/msg00143.txt.bz2 On Thu, Sep 09, 2004 at 07:02:07AM +0300, Eli Zaretskii wrote: > > Date: Wed, 8 Sep 2004 23:53:37 -0400 > > From: Daniel Jacobowitz > > 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. There's nothing generic controlled by TARGET_HAS_HARDWARE_WATCHPOINTS. It controls an include of in i386v-nat.c - that can be autoconf'd, and then checked for the appropriate DR_* constants if that's necessary. It controls the use of prwatch_t in procfs.c, likewise. -- Daniel Jacobowitz