forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user