RE: [RFA] Add la_getstr member to language_defn

Pierre Muller
2009-02-05T16:07:40Z

> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Tom Tromey
> Envoyé : Thursday, February 05, 2009 4:55 PM
> À : Thiago Jung Bauermann
> Cc : Daniel Jacobowitz; gdb-patches ml
> Objet : Re: [RFA] Add la_getstr member to language_defn
>
> >>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:
>
> Thiago> Right. Here's the new version. It also uses c_get_string for
> Ada and
> Thiago> minimal...
>
> Last night I thought of something else...
>
> Thiago> + Assumes strings are terminated by a null character.
> [...]
> Thiago> +void
> Thiago> +c_get_string (struct value *value, gdb_byte **buffer, int
> *length,
> Thiago> + const char **charset)
>
> My understanding is that the contract for la_getstr says that the
> resulting string will be zero-terminated. But if that is the case...

But this would also mean that the string could not contain
zero in the middle, which sometimes happens for pascal strings...

Isn't the length argument there for this?

Pierre Muller
Pascal language support maintainer for GDB