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:45:47AM +1300, Nick Roberts wrote:
> would have tried to adjust it.  When is it appropriate to use an XFAIL, if
> not here?

XFAIL are expected failures due to limitations of the environment.
Something which broke because your OS kernel version doesn't support
it, or because no version of GCC emits good information, is a
legitimate XFAIL.

>  > I'm still not convinced the change is ok.  Having 'char *' point to a
>  > buffer that's not null-terminated is not uncommon.  We have a lot of
>  > those in gdb itself.

Hi Mark,

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.  Just my opinion,
though - and I hope to be doing some more talking about data
representations this year...

-- 
Daniel Jacobowitz
CodeSourcery


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