From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12476 invoked by alias); 15 Jun 2003 06:53:18 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 12344 invoked from network); 15 Jun 2003 06:53:15 -0000 Received: from unknown (HELO aphrodite.gwi.net) (207.5.128.164) by sources.redhat.com with SMTP; 15 Jun 2003 06:53:15 -0000 Received: from goingware.com (d-216-195-158-119.gwi.net [216.195.158.119]) by aphrodite.gwi.net (8.12.6p2/8.12.6) with ESMTP id h5F6rDPh099792 for ; Sun, 15 Jun 2003 02:53:14 -0400 (EDT) (envelope-from crawford@goingware.com) Message-ID: <3EEC2751.8040201@goingware.com> Date: Sun, 15 Jun 2003 06:53:00 -0000 From: "Michael D. Crawford" Organization: GoingWare Inc. - Expert Software Development and Consulting User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.0.0) Gecko/20020622 Debian/1.0.0-0.woody.1 X-Accept-Language: en MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: touch and go breakpoints? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-06/txt/msg00297.txt.bz2 Is there a way I can set a breakpoint, where if it is hit, gdb will execute some command, and then continue? What I want to do is print out the value of a variable everytime a certain line in the code is encountered, but then continue. I have a crash somewhat later, but only after lots of iterations, so what I'd like to do is see what the last value of this variable is before the crash. I used to do this in MacsBug for the old Mac OS like this: brp 1234 ';dm a0;g' that will break at location 1234, display some memory starting at whatever register a0 is, then go. Thanks, Mike -- Michael D. Crawford GoingWare Inc. - Expert Software Development and Consulting http://www.goingware.com/ crawford@goingware.com Tilting at Windmills for a Better Tomorrow.