From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11171 invoked by alias); 10 Mar 2011 11:55:54 -0000 Received: (qmail 11157 invoked by uid 22791); 10 Mar 2011 11:55:53 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Mar 2011 11:55:49 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2ABtktN001639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Mar 2011 06:55:46 -0500 Received: from host1.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p2ABtieR005305 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 10 Mar 2011 06:55:46 -0500 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p2ABtiui005647; Thu, 10 Mar 2011 12:55:44 +0100 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p2ABthGS005645; Thu, 10 Mar 2011 12:55:43 +0100 Date: Thu, 10 Mar 2011 11:55:00 -0000 From: Jan Kratochvil To: Eli Zaretskii Cc: robertsong.japan@gmail.com, gdb@sourceware.org Subject: Re: Why no hwatch command in gdb ? Message-ID: <20110310115543.GA5414@host1.jankratochvil.net> References: <20110310081154.GA13603@host1.jankratochvil.net> <20110310103409.GA29242@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00072.txt.bz2 On Thu, 10 Mar 2011 12:26:41 +0100, Eli Zaretskii wrote: > > You may have requested too many hardware breakpoints/watchpoints. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > Well, you did, didn't you? I did request _any_ watchpoint. `watch' sometimes creates hardware ones, sometimes software ones. In fact on some arches (ppc?) it even works AFAIK. It is GDB's fault it did not choose the right wathcpoint kind. > If you expect GDB to know up front that they are too many, this is > hard to impossible with today's architecture, because only when the > watchpoints are inserted by the target, it is possible to know whether > there are enough resources for that. You are right the watchpoints infrastructure is very broken now. But it is being discussed for upstream kernel that the DR registers access via PTRACE_POKEUSER is broken anyway and GDB should use the existing hardware watchpoints support in Linux kernel perf via some higher level interface (still probably through the ptrace syscall). Thanks, Jan