RTTI type improvement for

xgsa xgsa@yandex.ru
Wed Feb 8 18:34:00 GMT 2012


Hi,
> Anton>  +struct value *
> Anton>  +readjust_indirect_value_type (struct value *value, struct type *enc_type,
> Anton>  +			      struct type *original_type,
> Anton>  +			      struct value *original_value)
>
> I wonder if there is a cleaner way to do this same thing.
> Say, a kind of value constructor as opposed to something that rewrites
> an existing value?
>
> If not, that is fine.

I just extract that code from value_ind. I'd prefer to leave it as is.

> Anton>  +extern struct value *
> Anton>  +readjust_indirect_value_type (struct value *value, struct type *enc_type,
> Anton>  +			      struct type *original_type,
> Anton>  +			      struct value *original_value);
>
> If you're going to split the first line that way, I think you should
> indent the subsequent lines by 4 or 5 spaces (not sure what the standard
> is, if there is one).
>
> Probably better to split before the open paren though (and still indent;
> there are examples of this elsewhere).

Did not noticed it. Fixed.


Note, that the copyright paperwork is done.


gdb/ChangeLog:

2012-01-06  Anton Gorenkov <xgsa@yandex.ru>

     * c-valprint.c (c_value_print): Use value_rtti_indirect_type
     instead of value_rtti_target_type.
     * eval.c (evaluate_subexp_standard): Use value_rtti_indirect_type
     instead of value_rtti_target_type.
     * typeprint.c (whatis_exp): Use value_rtti_indirect_type instead of
     value_rtti_target_type.
     * valops.c (value_ind): Extract function readjust_indirect_value_type.
     (value_rtti_target_type): Rename to ...
     (value_rtti_indirect_type): ... here and make it indirect.  Update
     function comment.
     * value.c (readjust_indirect_value_type): New function.
     (coerce_ref): Support for enclosing type setting for references
     with readjust_indirect_value_type.
     * value.h (readjust_value_type): New declaration.
     (value_rtti_target_type): Rename to ...
     (value_rtti_indirect_type): ... here.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb_reference_rtti_fix2.patch
Type: text/x-diff
Size: 8380 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20120208/c1071110/attachment.bin>


More information about the Gdb-patches mailing list