aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2014-04-12 09:09:41 -0700
committerDoug Evans <xdje42@gmail.com>2014-04-12 09:09:41 -0700
commit0be03e84176ab0077462b84ef236c56a7a0376fd (patch)
tree23beb33097129d8c9ff8798ba111f9150c273bed /gdb/guile
parentf180a1fb463a6a9ab4a883374120d16770486914 (diff)
downloadgdb-0be03e84176ab0077462b84ef236c56a7a0376fd.zip
gdb-0be03e84176ab0077462b84ef236c56a7a0376fd.tar.gz
gdb-0be03e84176ab0077462b84ef236c56a7a0376fd.tar.bz2
Copy over fix for fetching dynamic type of a reference from python side.
* guile/scm-value.c (gdbscm_value_dynamic_type): Use coerce_ref to dereference TYPE_CODE_REF values. testsuite/ * gdb.guile/scm-value.c: Improve test case. * gdb.guile/scm-value.exp: Add new test.
Diffstat (limited to 'gdb/guile')
-rw-r--r--gdb/guile/scm-value.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/guile/scm-value.c b/gdb/guile/scm-value.c
index 8ca0762..2160a1e 100644
--- a/gdb/guile/scm-value.c
+++ b/gdb/guile/scm-value.c
@@ -585,7 +585,10 @@ gdbscm_value_dynamic_type (SCM self)
struct value *target;
int was_pointer = TYPE_CODE (type) == TYPE_CODE_PTR;
- target = value_ind (value);
+ if (was_pointer)
+ target = value_ind (value);
+ else
+ target = coerce_ref (value);
type = value_rtti_type (target, NULL, NULL, NULL);
if (type)