[PATCH 5/9] Add support for printing value of DWARF-based fixed-point type objects
Joel Brobecker
brobecker@adacore.com
Sat Nov 14 11:30:05 GMT 2020
Hi again, Simon,
> > @@ -1821,6 +1845,9 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
> > (TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits == NULL ? 0 \
> > : B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (index)))
> >
> > +#define TYPE_FIXED_POINT_INFO(thistype) \
> > + (TYPE_MAIN_TYPE(thistype)->type_specific.fixed_point_info)
>
> Do you think you can make this macro a method on struct type in the
> style of the ones that were added recently? It will be one less macro
> to convert later :). That method should contain an assert that the type
> code is indeed TYPE_CODE_FIXED_POINT. I think it could return a
> `fixed_point_info &`, since there's no way it can fail and need to
> return nullptr (now I see that type::bounds should probably return a
> `range_bounds &` instead of a `range_bounds *`).
Can you tell me if the attached patch corresponds to what you had
in mind? As the revlog suggests, it's missing a bit of doc around it,
but I wanted to make sure I did this correctly before adding the forms.
Thank you,
--
Joel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-WIP-convert-TYPE_FIXED_POINT_INFO-to-methods-of-stru.patch
Type: text/x-diff
Size: 5575 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/gdb-patches/attachments/20201114/5cde6c04/attachment.bin>
More information about the Gdb-patches
mailing list