Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix ext lang calls to value_struct_elt
@ 2016-11-03 18:16 Doug Evans
  2016-11-03 20:59 ` Yao Qi
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2016-11-03 18:16 UTC (permalink / raw)
  To: gdb-patches

Hi.

I found this while reading the code.

2016-11-03  Doug Evans  <dje@google.com>

	* guile/scm-value.c (gdbscm_value_field): Fix call to value_struct_elt.
	* python/py-value.c (valpy_getitem): Ditto.

diff --git a/gdb/guile/scm-value.c b/gdb/guile/scm-value.c
index 1cdf953..416e488 100644
--- a/gdb/guile/scm-value.c
+++ b/gdb/guile/scm-value.c
@@ -726,7 +726,8 @@ gdbscm_value_field (SCM self, SCM field_scm)
      {
        struct value *tmp = value;

-      res_val = value_struct_elt (&tmp, NULL, field, NULL, NULL);
+      res_val = value_struct_elt (&tmp, NULL, field, NULL,
+				  "struct/class/union");
      }
    CATCH (except, RETURN_MASK_ALL)
      {
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 46683b8..f8bf17a 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -754,7 +754,8 @@ valpy_getitem (PyObject *self, PyObject *key)
        struct value *res_val = NULL;

        if (field)
-	res_val = value_struct_elt (&tmp, NULL, field, 0, NULL);
+	res_val = value_struct_elt (&tmp, NULL, field, NULL,
+				    "struct/class/union");
        else if (bitpos >= 0)
  	res_val = value_struct_elt_bitpos (&tmp, bitpos, field_type,
  					   "struct/class/union");


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix ext lang calls to value_struct_elt
  2016-11-03 18:16 [PATCH] Fix ext lang calls to value_struct_elt Doug Evans
@ 2016-11-03 20:59 ` Yao Qi
  2016-11-07 21:33   ` Doug Evans
  0 siblings, 1 reply; 3+ messages in thread
From: Yao Qi @ 2016-11-03 20:59 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb-patches

On Thu, Nov 03, 2016 at 06:16:10PM +0000, Doug Evans wrote:
> Hi.
> 
> I found this while reading the code.
> 
> 2016-11-03  Doug Evans  <dje@google.com>
> 
> 	* guile/scm-value.c (gdbscm_value_field): Fix call to value_struct_elt.
> 	* python/py-value.c (valpy_getitem): Ditto.
>

Patch is good to me.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix ext lang calls to value_struct_elt
  2016-11-03 20:59 ` Yao Qi
@ 2016-11-07 21:33   ` Doug Evans
  0 siblings, 0 replies; 3+ messages in thread
From: Doug Evans @ 2016-11-07 21:33 UTC (permalink / raw)
  To: Yao Qi; +Cc: gdb-patches

On Thu, Nov 3, 2016 at 1:59 PM, Yao Qi <qiyaoltc@gmail.com> wrote:
> On Thu, Nov 03, 2016 at 06:16:10PM +0000, Doug Evans wrote:
>> Hi.
>>
>> I found this while reading the code.
>>
>> 2016-11-03  Doug Evans  <dje@google.com>
>>
>>       * guile/scm-value.c (gdbscm_value_field): Fix call to value_struct_elt.
>>       * python/py-value.c (valpy_getitem): Ditto.
>>
>
> Patch is good to me.

Committed, thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-11-07 21:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-03 18:16 [PATCH] Fix ext lang calls to value_struct_elt Doug Evans
2016-11-03 20:59 ` Yao Qi
2016-11-07 21:33   ` Doug Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox