This is the mail archive of the
mailing list for the GDB project.
Re: String handling in GDB command language variables
On Thu, Feb 27, 2003 at 11:45:57AM -0500, Andrew Cagney wrote:
> >The command language always mimics the current source language being
> >debugged, defaulting to C; C doesn't have a string type. That's the
> >historical justification anyway.
> >If there's a consensus that a string type would be useful, it could
> >probably be done. I think it might be a good idea; we could use
> >strings for arguments to gdb commands, etc. However I'm not sure of
> >the syntax.
> DanielJ's comment, GDB's current behavior is to always a malloc(), store
> the value in the target, and then create a `char *' `struct value'.
> Is there anything in the `rule book' that says that GDB can be lazy
> (when given "string" create a `char' `struct value' and then only
> allocate space / create the pointer when the value is needed by the
> target)? Is this trivial? Is this needed?
> "no"? "no"? "yes"?
Those are my guesses, too. I think that this change could also be
related to the kfail in our testsuite dealing with character array
MontaVista Software Debian GNU/Linux Developer