From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18150 invoked by alias); 10 Mar 2011 10:34:27 -0000 Received: (qmail 17885 invoked by uid 22791); 10 Mar 2011 10:34:26 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_TD,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 10:34:15 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2AAYCnH030614 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 10 Mar 2011 05:34:12 -0500 Received: from host1.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p2AAYAjX024012 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 10 Mar 2011 05:34:12 -0500 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p2AAYAml029385; Thu, 10 Mar 2011 11:34:10 +0100 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p2AAY9jG029380; Thu, 10 Mar 2011 11:34:09 +0100 Date: Thu, 10 Mar 2011 10:34:00 -0000 From: Jan Kratochvil To: robert song Cc: gdb@sourceware.org Subject: Re: Why no hwatch command in gdb ? Message-ID: <20110310103409.GA29242@host1.jankratochvil.net> References: <20110310081154.GA13603@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/msg00069.txt.bz2 Hi Robert, On Thu, 10 Mar 2011 11:09:23 +0100, robert song wrote: > On 3/10/11, Jan Kratochvil wrote: > > Watchpoints are normally created by default as hardware ones. They should > > fallback to their software variants when you get out of the number of debug > > registers but that does not work well now. > > > "does not work well now" means ? GNU gdb (GDB) 7.2.50.20110310-cvs This GDB was configured as "x86_64-unknown-linux-gnu". (gdb) watch gdb_stdout Hardware watchpoint 2: gdb_stdout (gdb) watch gdb_stderr Hardware watchpoint 3: gdb_stderr (gdb) watch gdb_stdlog Hardware watchpoint 4: gdb_stdlog (gdb) watch gdb_stdin Hardware watchpoint 5: gdb_stdin (gdb) watch gdb_stdtargin Hardware watchpoint 6: gdb_stdtargin (gdb) continue Continuing. Warning: Could not insert hardware watchpoint 5. Could not insert hardware breakpoints: You may have requested too many hardware breakpoints/watchpoints. (gdb) > The problem is that sometimes I just want to set only hardware > watchpoints, and don't want to set software watchpoints. But the > watchpoint will be changed to software ones if hardware watchpoints > are exceeded, When at least one watchpoint is a software one GDB has to start single-stepping the inferior. At that moment it does not matter whether some additional watchpoints are software or hardware ones. Thanks, Jan