Re: [PATCH 7/9] Add ptype support for DWARF-based fixed-point types

Joel Brobecker
2020-11-16T04:28:36Z

> My guess is that it works for C just because of this single case in its
> type print function:
>
> https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/c-typeprint.c;h=10631fff9a8006baf885dcd03720074d5f95f8b9;hb=5778e0dd5d7bb872398a136b6504b9b99d5ce434#l1683
>
> If it's a matter of just adding this case to the m2 and pascal in their
> type print functions, I think it would be nice simply to avoid the
> special case in the test. If it's anything more complex than that, then
> I agree with you that it's not worth it.

It's indeed nicer, but the thing that stopped me is that ultimately
it's time spent doing something unlikely to be useful. Even if it is
only 10-15 min to make the change, test and submit it, it's still time
away from more useful changes. That being said, I think you are actually
right with this. Now that I was made to look into it, I think the issue
is in the common type printer, and so adding support there would seem
logical, considering how I tried to make said support as generic as
possible.

I will look further into it next weekend.

--
Joel