This is the mail archive of the gdb-patches@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: MI failures related to string printing


On Wed, Jan 17, 2007 at 10:44:13PM +0100, Mark Kettenis wrote:
> > We already use the equivalent of "print" to pass the value to the front
> > end when it asks for the variable's value.  What Nick's change did was
> > to use the same code when it asks if the variable's "value" has
> > changed.  I think it's an improvement on that basis alone.
> > 
> > If we wanted printing a char * which doesn't point to a string to stop
> > after one character, we'd need some way to identify strings, which
> > C doesn't really give us.  As long as it's convenient for "print"
> > to dump out the string, I suspect MI ought to too.
> 
> Agreed, at least if you explicitly ask for it.  However, the testsuite
> does something like "-var-update *", which does not seem very explicit
> to me.  Or am I missing something.

It's already asked for a varobj for that particular variable, of type
"char *" - I think the closest analogy is "info locals" here, which
would show the same output.

-- 
Daniel Jacobowitz
CodeSourcery


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