summaryrefslogtreecommitdiff
path: root/gdb/values.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2001-05-21 20:08:59 +0000
committerJim Blandy <jimb@codesourcery.com>2001-05-21 20:08:59 +0000
commita3ab51527c98c2c2d1c175821a2f2ab3e28d5ed0 (patch)
tree9bd61edc1a0e5b426d080680450044d690d75717 /gdb/values.c
parentf5d68f11d615fb3ac83e9e22633e1fdc58113ba2 (diff)
downloadgdb-a3ab51527c98c2c2d1c175821a2f2ab3e28d5ed0.tar.gz
* values.c (value_primitive_field): If we're extracting a base
class, then the type of the result should be the base class being extracted, not the type of which it is a base class.
Diffstat (limited to 'gdb/values.c')
-rw-r--r--gdb/values.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/values.c b/gdb/values.c
index 8336233dab0..f5a7ce001e1 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -856,7 +856,7 @@ value_primitive_field (register value_ptr arg1, int offset,
entire object's contents for later references to virtual
bases, etc. */
v = allocate_value (VALUE_ENCLOSING_TYPE (arg1));
- VALUE_TYPE (v) = arg_type;
+ VALUE_TYPE (v) = type;
if (VALUE_LAZY (arg1))
VALUE_LAZY (v) = 1;
else