From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20095 invoked by alias); 8 Jan 2010 16:49:04 -0000 Received: (qmail 20069 invoked by uid 22791); 8 Jan 2010 16:49:01 -0000 X-SWARE-Spam-Status: No, hits=-0.1 required=5.0 tests=AWL,BAYES_20,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 08 Jan 2010 16:48:57 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0KVX00000T2SOW00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Fri, 08 Jan 2010 18:48:37 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.127.222.44]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KVX00KQTTCW4RQ0@a-mtaout22.012.net.il>; Fri, 08 Jan 2010 18:48:33 +0200 (IST) Date: Fri, 08 Jan 2010 16:49:00 -0000 From: Eli Zaretskii Subject: Re: [RFC] Wrong hw_watchpoint_used_count? (multiple location watchpoints) In-reply-to: <20100108130858.GF29312@adacore.com> To: Joel Brobecker Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83r5q0a6fw.fsf@gnu.org> References: <20100108075701.GE4589@adacore.com> <83fx6gc43p.fsf@gnu.org> <20100108102955.GC29312@adacore.com> <83aawobxze.fsf@gnu.org> <20100108122555.GD29312@adacore.com> <83zl4oah5f.fsf@gnu.org> <20100108130858.GF29312@adacore.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-01/txt/msg00178.txt.bz2 > Date: Fri, 8 Jan 2010 17:08:58 +0400 > From: Joel Brobecker > Cc: gdb-patches@sourceware.org > > > That _is_ the design. However, GDB does not tell enough to the target > > for the target to give an accurate answer. And what's more, some > > questions cannot be answered without actually trying to call ptrace or > > its equivalents, and getting its ``opinion''. Unless we mirror all > > the necessary information on the target level that is (which is what > > x86 does). > > Hmmm, so you're saying that the situation on x86 is because we cannot > know in advance how many watchpoints the CPU provides? On x86 we do know. On other architectures we might not be able to know. But even on x86, breakpoint.c does not pass enough information to the target for the latter to know if the requested watchpoints will be successfully inserted. For that, GDB would need to provide the address of each watchpoint, its type (read/write), and the length of the watched area. It currently does not provide that.