From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1340 invoked by alias); 27 Jun 2007 12:00:07 -0000 Received: (qmail 1292 invoked by uid 22791); 27 Jun 2007 12:00:06 -0000 X-Spam-Check-By: sourceware.org Received: from smtp1.rug.nl (HELO smtp1.rug.nl) (129.125.50.11) by sourceware.org (qpsmtpd/0.31) with SMTP; Wed, 27 Jun 2007 12:00:00 +0000 Received: from smtp1.rug.nl ([129.125.50.11]) by smtp1.rug.nl (SMSSMTP 4.1.0.19) with SMTP id M2007062713595808419 for ; Wed, 27 Jun 2007 13:59:58 +0200 Received: from [129.125.177.235] (theobio36.biol.rug.nl [129.125.177.235]) by smtp1.rug.nl (8.12.11.20060308/8.12.11) with ESMTP id l5RBxvZe010523; Wed, 27 Jun 2007 13:59:57 +0200 (MEST) Message-ID: <4682513D.5040903@rug.nl> Date: Wed, 27 Jun 2007 12:00:00 -0000 From: Bram Kuijper User-Agent: Thunderbird 2.0.0.4 (X11/20070618) MIME-Version: 1.0 To: Bram Kuijper , gdb@sourceware.org Subject: Re: evaluate more complex expressions using gdb References: <468239D9.1090001@rug.nl> <20070627103533.GA11494@caradoc.them.org> In-Reply-To: <20070627103533.GA11494@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Report: Spam detection software on "smtp1.rug.nl". Questions: postmaster@rug.nl Content analysis details: (-5.0 points, 4.0 required) USER_IN_WHITELIST=-5 ____ 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: 2007-06/txt/msg00340.txt.bz2 Daniel Jacobowitz wrote: > On Wed, Jun 27, 2007 at 12:20:09PM +0200, Bram Kuijper wrote: >> Hi all, >> >> again a newbie question: can I also evaluate the result of subtractions, >> additions using the display command? Like some pointer arithmetics: >> >> display pointer1 - start_pointer >> >> If I do this, gdb gives me the following error: >> >> Disabling display 6 to avoid infinite recursion. >> 6: pointer1 - start_pointer = One of the arguments you tried to pass to >> operator- could not be converted to what the function wants. >> >> Is there any way to to this using gdb? > > You probably need some casts. The error message means GDB found a > relevant overloaded operator- in your program for one of those types. > I guess that will be a browse through STL's internals then, since I substract two std::vector::iterators from each other. thanks for the advice, Bram