From: Yao Qi <qiyaoltc@gmail.com>
To: Bernhard Heckel <bernhard.heckel@intel.com>
Cc: brobecker@adacore.com, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] fort_dyn_array: Support evaluation of dynamic elements inside arrays.
Date: Mon, 04 Apr 2016 13:42:00 -0000 [thread overview]
Message-ID: <86d1q5pk2g.fsf@gmail.com> (raw)
In-Reply-To: <1458204189-13267-3-git-send-email-bernhard.heckel@intel.com> (Bernhard Heckel's message of "Thu, 17 Mar 2016 09:43:08 +0100")
Bernhard Heckel <bernhard.heckel@intel.com> writes:
> +# Check allocation status of dynamic array and it's dynamic members
s/it's/its/
> diff --git a/gdb/valarith.c b/gdb/valarith.c
> index 7959f3b..62d0e30 100644
> --- a/gdb/valarith.c
> +++ b/gdb/valarith.c
> @@ -207,6 +207,15 @@ value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound)
> error (_("no such vector element"));
> }
>
> + if (is_dynamic_type (elt_type))
> + {
> + gdb_byte *valaddr = NULL;
> + CORE_ADDR address;
> +
> + address = value_address (array) + elt_offs;
> + elt_type = resolve_dynamic_type (elt_type, valaddr, address);
Pass NULL to resolve_dynamic_type, so valaddr can be removed.
> + }
> +
> if (VALUE_LVAL (array) == lval_memory && value_lazy (array))
> v = allocate_value_lazy (elt_type);
> else
Patch looks good to me, otherwise.
--
Yao (齐尧)
next prev parent reply other threads:[~2016-04-04 13:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-17 8:43 [PATCH 0/3] fortran: Enable arrays of structures with dynamic member types Bernhard Heckel
2016-03-17 8:43 ` [PATCH 2/3] fort_dyn_array: Support evaluation of dynamic elements inside arrays Bernhard Heckel
2016-04-04 9:22 ` [PATCH 2/3][PING] " Heckel, Bernhard
2016-04-04 13:42 ` Yao Qi [this message]
2016-03-17 8:43 ` [PATCH 1/3] fort_dyn_array: Enable dynamic member types inside a structure Bernhard Heckel
2016-04-04 9:22 ` [PATCH 1/3][PING] " Heckel, Bernhard
2016-04-04 13:31 ` [PATCH 1/3] " Yao Qi
2016-04-04 16:24 ` Yao Qi
2016-04-05 7:31 ` Heckel, Bernhard
2016-04-05 10:47 ` Yao Qi
2016-04-05 12:42 ` Heckel, Bernhard
2016-04-06 16:09 ` Yao Qi
2016-04-07 6:03 ` Heckel, Bernhard
2016-03-17 8:43 ` [PATCH 3/3] fort_dyn_array: Use value constructor instead of raw-buffer manipulation Bernhard Heckel
2016-04-04 13:54 ` Yao Qi
2016-04-05 9:31 ` Heckel, Bernhard
2016-04-04 9:21 ` [PATCH 0/3][PING] fortran: Enable arrays of structures with dynamic member types Heckel, Bernhard
2016-04-04 10:50 ` [PATCH 0/3] " Yao Qi
2016-04-04 12:16 ` Heckel, Bernhard
2016-04-04 14:41 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86d1q5pk2g.fsf@gmail.com \
--to=qiyaoltc@gmail.com \
--cc=bernhard.heckel@intel.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox