This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 09/55] Use common_val_print in c-valprint.c
- From: Tom Tromey <tom at tromey dot com>
- To: Simon Marchi <simark at simark dot ca>
- Cc: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Thu, 23 Jan 2020 17:54:08 -0700
- Subject: Re: [PATCH 09/55] Use common_val_print in c-valprint.c
- References: <20191208182958.10181-1-tom@tromey.com> <20191208182958.10181-10-tom@tromey.com> <52163596-3d8c-a265-f394-30d5601cae29@simark.ca>
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
>> + if (TYPE_CODE (type) == TYPE_CODE_PTR
>> + && TYPE_NAME (type) == NULL
>> + && TYPE_NAME (TYPE_TARGET_TYPE (type)) != NULL
>> + && (strcmp (TYPE_NAME (TYPE_TARGET_TYPE (type)),
>> "char") == 0
>> - || textual_name (TYPE_NAME (TYPE_TARGET_TYPE (val_type)))))
>> + || textual_name (TYPE_NAME (TYPE_TARGET_TYPE (type)))))
>> {
>> /* Print nothing. */
>> }
Simon> This introduces a behavior change. It's not dramatic, but I don't think it was
Simon> intended, otherwise you would have mentioned it.
Wow, nice catch. And thank you.
I've added a test case for this to the patch, and I've fixed it.
Tom