String handling in GDB command language variables
Andrew Cagney
ac131313@redhat.com
Thu Feb 27 16:43:00 GMT 2003
> 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"?
Andrew
More information about the Gdb
mailing list