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: [RFA] Add la_getstr member to language_defn



> -----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





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