This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix use of lazy strings outside of pretty-printers
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 04 Apr 2016 17:25:59 +0100
- Subject: Re: [PATCH] Fix use of lazy strings outside of pretty-printers
- Authentication-results: sourceware.org; auth=none
- References: <001a113acad09920e7052f4b6c95 at google dot com>
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 (éå)