aboutsummaryrefslogtreecommitdiff
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
commit8d65888a44248188564eef092fb32fbac74a464a (patch)
tree023b0ee7eee5f400ebe5ed386a368b02547b0057 /gdb/values.c
parenta44999d56d2f5fd182ce92172b0865c1b152acfb (diff)
downloadgdb-8d65888a44248188564eef092fb32fbac74a464a.zip
gdb-8d65888a44248188564eef092fb32fbac74a464a.tar.gz
gdb-8d65888a44248188564eef092fb32fbac74a464a.tar.bz2
* 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 8336233..f5a7ce0 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