Fix ext lang calls to value_struct_elt.
authorDoug Evans <dje@google.com>
Mon, 7 Nov 2016 21:31:24 +0000 (13:31 -0800)
committerDoug Evans <dje@google.com>
Mon, 7 Nov 2016 21:31:24 +0000 (13:31 -0800)
gdb/ChangeLog:

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

gdb/ChangeLog
gdb/guile/scm-value.c
gdb/python/py-value.c

index f4f6fd5148748e55059feaabcfd8b567831a22bd..fbdb16859811c5091aa9e96702adadb14dcbebac 100644 (file)
@@ -1,3 +1,8 @@
+2016-11-07  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.
+
 2016-11-07  Doug Evans  <dje@google.com>
 
        * i386-tdep.c (i386_gdbarch_init): Add comments.
index 1cdf9537711b04ddf6e86041337636a2ca85d6e4..416e48815f93a35bfacdcc7e68577f3ed328a290 100644 (file)
@@ -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)
     {
index 46683b818d36b69fca0cadf321e8daafbaa98e4c..f8bf17af4592c2ef5f24b1baff33d66cd7316b42 100644 (file)
@@ -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");