From: jimb Date: Mon, 21 May 2001 20:08:59 +0000 (+0000) Subject: * values.c (value_primitive_field): If we're extracting a base X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=778326dc7f78cefc118a005a7b675f01519164bd;p=pf3gnuchains%2Fsourceware.git * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 202bb42514..b154976f86 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2001-05-21 Jim Blandy + * 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. + * value.h (struct value): Doc fix, and rearrange members to place them near their explanations. diff --git a/gdb/values.c b/gdb/values.c index 8336233dab..f5a7ce001e 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