Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of rudimentary error tracing #579

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

czurnieden
Copy link
Contributor

This adds a compile-time-optional macro that inserts a line to print out the filename, line-number, and function to stderr before all of the goto LTM_ERR; instances and all return err; if err != MP_OKAY.

@czurnieden
Copy link
Contributor Author

Eases the work quite a bit if the error comes from deep inside a recursive function.
Found it very useful while debugging the fast-radix-conversion at the upper limit of LTM and had to add higher Toom-Cook functions (4 - 7) to avoid waiting a week to get the result. (One MP_OVF had the reason that mp_add adds an extra limb unconditionally, so the maximum number is 2^((MP_MAX_DIGIT_COUNT - 2)*MP_DIGIT_BIT))

Ah, the first typo has already been found :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant