Re: RFA: wrap mpz_export into gdb_mpz::safe_export...

Christian Biesinger via Gdb-patches
2020-11-30T12:45:29Z

On Sun, Nov 29, 2020 at 4:46 PM Joel Brobecker <brobecker@adacore.com> wrote:
> For the record, I didn't do the following, but I was thinking it would
> be nice to poison mpz_export if we could. We can do that as a followup
> patch, if we'd like, although I will likely need a bit of help doing so,
> because I am not sure how to poison it for the entire GDB except the one
> place where it's OK to use it. In the end, it sounds to me like Tom
> wants to wrap GDB's usage of gmp into the gdb_mp[xxx] classes, and so,
> once we have that, it seems unlikely that someone would unwittingly use
> mpz_export directly.

Maybe #define mpz_export DO_NOT_USE and #undef it in the one spot?

Christian