From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21924 invoked by alias); 10 Mar 2011 14:47:19 -0000 Received: (qmail 21912 invoked by uid 22791); 10 Mar 2011 14:47:17 -0000 X-SWARE-Spam-Status: No, hits=0.9 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mailrelay009.isp.belgacom.be (HELO mailrelay009.isp.belgacom.be) (195.238.6.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Mar 2011 14:47:09 +0000 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAH9yeE1tgHE9/2dsb2JhbACKCZx4eIhBuFkNhVUE Received: from 61.113-128-109.adsl-dyn.isp.belgacom.be (HELO soleil) ([109.128.113.61]) by relay.skynet.be with SMTP; 10 Mar 2011 15:47:05 +0100 Message-ID: From: "Philippe Waroquiers" To: "Jan Kratochvil" , "robert song" Cc: , "Julian Seward" References: <20110310081154.GA13603@host1.jankratochvil.net> <20110310103409.GA29242@host1.jankratochvil.net> <20110310134453.GA11068@host1.jankratochvil.net> Subject: Re: Why no hwatch command in gdb ? Date: Thu, 10 Mar 2011 14:47:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit 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/msg00076.txt.bz2 On the side of 'hardware' watchpoints limitations: I am busy embedding a gdbserver inside Valgrind (target is to integrate it in April, but more review activity is still needed). As part of this work, unlimited "simulated hardware watchpoints" have been implemented on top of the "address access/validity bits" of Valgrind memcheck tool. These simulated hardware watchpoints are of course a lot slower than real hardware watchpoint, but they are faster than gdb "single stepping" watchpoints (and more over, you have unlimited "read watchpoints"). I only encountered a small problem with gdb "remote": There is a gdb command to configure the nr of remote hardware watchpoint but there is no command to configure the length for an hardware watchpoint: e.g. for i386, gdb remote "hardcodes" the length to 4 bytes (which looks wrong btw, as the real hw can go up to 8 bytes I believe). So, I have in a corner a patch implementing 'set remote hardware-watchpoint-length-limit' to configure the max length limit of an hw watchpoint. With this patch + Valgrind gdbserver, you can e.g. read or write or access watch many and/or big memory ranges, paying "only" the "limited" Valgrind memcheck overhead (still big overhead, but significantly faster than pure gdb software watchpoint). I believe it would be nice to add this new command in gdb. If you want more info about the gdbserver in Valgrind, I can give more (I expect to output a new improved beta version of the Valgrind gdbserver patch in the coming days). Philippe