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: [PATCH] Fix use of lazy strings outside of pretty-printers


Doug Evans <dje@google.com> writes:

Hi Doug,
patch is good to me,

> +      long length = self_string->length;
> +      struct type *index_type, *range_type, *array_type;
> +
> +      if (TYPE_OBJFILE_OWNED (elm_type))
> +	index_type
> +	  = objfile_type (TYPE_OWNER (elm_type).objfile)->builtin_long;
> +      else
> +	index_type
> +	  = builtin_type (TYPE_OWNER (elm_type).gdbarch)->builtin_long;
> +
> +      if (self_string->length == -1)

Nit: s/length/self_string->length/

> +	range_type = create_static_range_type (NULL, index_type, 0, -1);
> +      else
> +	range_type
> +	  = create_static_range_type (NULL, index_type, 0, length - 1);

-- 
Yao (éå)


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