From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1471 invoked by alias); 14 Mar 2007 00:22:51 -0000 Received: (qmail 1462 invoked by uid 22791); 14 Mar 2007 00:22:51 -0000 X-Spam-Check-By: sourceware.org Received: from mta06.pge.com (HELO mta06.pge.com) (131.90.0.76) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 14 Mar 2007 00:22:46 +0000 Received: from mta16.comp.pge.com (mta16.comp.pge.com [10.244.4.51]) by mta06.pge.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id l2E0MhRp005776 for ; Tue, 13 Mar 2007 17:22:43 -0700 (PDT) Received: from mdssdr01.utility.pge.com (mdssdr01.utility.pge.com [10.244.52.48]) by mta16.comp.pge.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id l2E0Mg0v028927 for ; Tue, 13 Mar 2007 17:22:42 -0700 (PDT) Received: (from esp5@localhost) by mdssdr01.utility.pge.com (8.11.7p3+Sun/8.11.7) id l2E0Mgp14059 for gdb@sourceware.org; Tue, 13 Mar 2007 17:22:42 -0700 (PDT) Date: Wed, 14 Mar 2007 00:22:00 -0000 From: "Ed S. Peschko" To: gdb@sourceware.org Subject: dynamic breakpoints/watchpoints Message-ID: <20070314002242.GB17710@venus> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i 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: 2007-03/txt/msg00191.txt.bz2 All, I'm not sure how feasible this is for gdb, but I've written something like this for perl and it does wonders for your productivity, especially in dealing with unfamiliar code. What I'm looking for is something akin to grep integrated with gdb. Commands like: bc /pattern_in_code/ would stop at the first place where 'pattern_in_code' was seen after continuing execution, and bv /pattern_in_variable/ would monitor the data that *any* variable is using, and stop as soon as an assignment of that pattern is made to that variable. Of course, it might be difficult to do this with c, with differences between floats && ints && ascii data, but it's not impossible. Maybe, 'bs' for break string, or bi for break integer would do the trick.. Thoughts? I'd think that 'bc' would be easier to implement but I'm not sure... Ed