How to debug GMP in Mint?

Andy borucki.andrzej at gmail.com
Sun Nov 10 19:52:03 UTC 2019


First, I try to install:
sudo apt-get install libgmp-dev
already installed :libgmp-dev is already the newest version
(2:6.1.2+dfsg-2).
(what means "2:" ?)
I create cmake application and go with CLion.
in CMakeLists.txt is:
add_executable(gmptest main.cpp)
target_link_libraries(gmptest
        gmp)
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


More information about the gmp-discuss mailing list