diff options
Diffstat (limited to 'gdb/python/py-value.c')
-rw-r--r-- | gdb/python/py-value.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c index a118f6c..54da67a 100644 --- a/gdb/python/py-value.c +++ b/gdb/python/py-value.c @@ -309,7 +309,10 @@ valpy_get_dynamic_type (PyObject *self, void *closure) struct value *target; int was_pointer = TYPE_CODE (type) == TYPE_CODE_PTR; - target = value_ind (val); + if (was_pointer) + target = value_ind (val); + else + target = coerce_ref (val); type = value_rtti_type (target, NULL, NULL, NULL); if (type) |