From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27937 invoked by alias); 10 Mar 2011 10:09:30 -0000 Received: (qmail 27927 invoked by uid 22791); 10 Mar 2011 10:09:29 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-iy0-f169.google.com (HELO mail-iy0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Mar 2011 10:09:25 +0000 Received: by iyf13 with SMTP id 13so1858264iyf.0 for ; Thu, 10 Mar 2011 02:09:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.43.65.197 with SMTP id xn5mr9987421icb.87.1299751763440; Thu, 10 Mar 2011 02:09:23 -0800 (PST) Received: by 10.42.163.7 with HTTP; Thu, 10 Mar 2011 02:09:23 -0800 (PST) In-Reply-To: <20110310081154.GA13603@host1.jankratochvil.net> References: <20110310081154.GA13603@host1.jankratochvil.net> Date: Thu, 10 Mar 2011 10:09:00 -0000 Message-ID: Subject: Re: Why no hwatch command in gdb ? From: robert song To: Jan Kratochvil Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 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/msg00068.txt.bz2 Hi, Jan, 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 ? > You can request hardware vs. software watchpoints by using: > (gdb) help set can-use-hw-watchpoints > Set debugger's willingness to use watchpoint hardware. > If zero, gdb will not use hardware for new watchpoints, even if > such is available. (However, any hardware watchpoints that were > created before setting this to nonzero, will continue to use watchpoint > hardware.) > > The difference is that software breakpoints are very cheap so GDB does not > even > attempt to create hardware breakpoints. While software watchpoints are very > expensive so - in fact GDB does not normally try to fallback to software > ones. > When you have to use software watchpoints it is commonly even not viable to > wait for so long. 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, and if I have command like hwatch, I can avoid it. Regards, robert