From 5996220cfa24ef6fddb782617720cd56913b1bb7 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Mon, 7 Nov 2016 13:31:24 -0800 Subject: [PATCH] Fix ext lang calls to value_struct_elt. gdb/ChangeLog: * guile/scm-value.c (gdbscm_value_field): Fix call to value_struct_elt. * python/py-value.c (valpy_getitem): Ditto. --- gdb/ChangeLog | 5 +++++ gdb/guile/scm-value.c | 3 ++- gdb/python/py-value.c | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f4f6fd51487..fbdb1685981 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-11-07 Doug Evans + + * 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 * i386-tdep.c (i386_gdbarch_init): Add comments. diff --git a/gdb/guile/scm-value.c b/gdb/guile/scm-value.c index 1cdf9537711..416e48815f9 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 46683b818d3..f8bf17af459 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"); -- 2.30.2