[PATCH v3 03/11] [PR gdb/14441] gdb: valops: add ability to return rvalue reference values from value_ref()
Keith Seitz
keiths@redhat.com
Wed Mar 16 22:22:00 GMT 2016
On 03/04/2016 07:19 PM, Artemiy Volkov wrote:
> diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
> index 62552ec..a1f5db6 100644
> --- a/gdb/c-valprint.c
> +++ b/gdb/c-valprint.c
> @@ -602,10 +602,13 @@ c_value_print (struct value *val, struct ui_file *stream,
> else if (options->objectprint
> && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_STRUCT))
> {
> - int is_ref = TYPE_CODE (type) == TYPE_CODE_REF;
> + int is_ref = TYPE_IS_REFERENCE (type);
> + enum type_code refcode = TYPE_CODE_UNDEF;
>
> - if (is_ref)
> + if (is_ref) {
> val = value_addr (val);
> + refcode = TYPE_CODE (type);
> + }
>
Open braces go on new line.
> /* Pointer to class, check real type of object. */
> fprintf_filtered (stream, "(");
Keith
More information about the Gdb-patches
mailing list