Re: [PATCH 3/9] gmp-utils: New API to simply use of GMP's integer/rational/float objects

Joel Brobecker
2020-11-18T03:52:20Z

Hi Luis,

> Just a quick comment... shouldn't gmp-utils.c go into gdbsupport so
> gdbserver can use it as well?

I think you would need to make GDBserver require GMP support first.
I don't see where GDBserver would benefit from GMP, but if it does,
I don't believe it would be a problem to move it to gdbsupport.

> On 11/8/20 3:30 AM, Joel Brobecker wrote:
> > This API was motivated by a number of reasons:
> > - GMP's API does not handle "long long" and "unsigned long long",
> > so using LONGEST and ULONGEST is not straightforward;
> > - Automate the need to initialize GMP objects before use, and
> > clear them when no longer used.
> >
> > However, this API grew also to help with similar matter such
> > as formatting to a string, and also reading/writing fixed-point
> > values from byte buffers.
> >
> > Dedicated unit testing is also added.
> >
> > gdb/ChangeLog:
> >
> > * gmp-utils.h, gmp-utils.h: New file.
>
> Typo in the filename.

Thanks for catching this, I will fix.

--
Joel