This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 02/10] type: add c99 variable length array support
- From: Tom Tromey <tromey at redhat dot com>
- To: Sanimir Agovic <sanimir dot agovic at intel dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 07 Nov 2013 12:09:57 -0700
- Subject: Re: [PATCH 02/10] type: add c99 variable length array support
- Authentication-results: sourceware.org; auth=none
- References: <1382366424-21010-1-git-send-email-sanimir dot agovic at intel dot com> <1382366424-21010-3-git-send-email-sanimir dot agovic at intel dot com>
>>>>> "Sanimir" == Sanimir Agovic <sanimir.agovic@intel.com> writes:
Sanimir> + if (TYPE_CODE (type) == TYPE_CODE_ARRAY
Sanimir> + && TYPE_NFIELDS (type) == 1)
Sanimir> + {
Sanimir> + const struct type *range_type = TYPE_INDEX_TYPE (type);
Sanimir> +
Sanimir> + if (!has_static_range (TYPE_RANGE_DATA (range_type)))
Sanimir> + return 1;
Sanimir> + }
Sanimir> +
Sanimir> + if (TYPE_CODE (type) == TYPE_CODE_PTR
Sanimir> + || TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
Sanimir> + return is_dynamic_type (TYPE_TARGET_TYPE (type));
I didn't notice the first time, but I think some check_typedef calls are
needed here as well.
Tom