How to debug GMP in Mint?

Torbjörn Granlund tg at
Sun Nov 10 20:14:28 UTC 2019

Andy <borucki.andrzej at> writes:

  First, I try to install:
  sudo apt-get install libgmp-dev
  already installed :libgmp-dev is already the newest version
  (what means "2:" ?)

You need to ask the maintainer of your OS.

  I create cmake application and go with CLion.
  in CMakeLists.txt is:
  add_executable(gmptest main.cpp)
  I have test function:
  int testdiv()
      mp_limb_t resDigits[1];
      mp_limb_t remDigits[1];
      mp_limb_t xDigits[1];
      mp_limb_t yDigits[1];
      xDigits[0] = 100;
      yDigits[0] = 7;
      mpn_tdiv_qr(resDigits, remDigits, 0,
                  xDigits, 1, yDigits, 1);
      cout << "result=" << resDigits[0] <<endl;
  I debug program but I can't go inside mpn_tdiv_qr

This is a general programming/debugging question.  It is therefore not
something which is suitable for any GMP list.

Please encrypt, key id 0xC8601622

More information about the gmp-discuss mailing list