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


>>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:

[ la_getstr ]
Thiago> The patch doesn't apply anymore. This is the same patch, refreshed
Thiago> against HEAD as of Dec 28th. 

Thiago> +   Return 0 on success, errno on failure.  */
Thiago> +
Thiago> +static int
Thiago> +c_get_string (struct value *value, gdb_byte **buffer, int *length,
Thiago> +	      const char **charset)

The return value here is a bit funny.  For some errors this function
calls error, but for others it returns the result of read_string.

When would we want the latter behavior?  I think perhaps la_getstr
should simply have 'void' type and then call error if read_string
returns an error.

What do you think?

Otherwise, this patch seems good to me.  I'm not completely
comfortable approving it outright; but if there are no objections
after a week or so, I will.

Tom


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