This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: evaluate more complex expressions using gdb


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.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]