This is the mail archive of the
mailing list for the GDB project.
Re: evaluate more complex expressions using gdb
- From: Bram Kuijper <a dot l dot w dot kuijper at rug dot nl>
- To: Bram Kuijper <a dot l dot w dot kuijper at rug dot nl>, gdb at sourceware dot org
- Date: Wed, 27 Jun 2007 13:59:57 +0200
- Subject: Re: evaluate more complex expressions using gdb
- References: <468239D9.firstname.lastname@example.org> <20070627103533.GA11494@caradoc.them.org>
Daniel Jacobowitz wrote:
On Wed, Jun 27, 2007 at 12:20:09PM +0200, Bram Kuijper wrote:
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<Type>::iterators from each other.
thanks for the advice,