Skip to content

[debug] Add manticore::debug #108

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

[debug] Add manticore::debug #108

wants to merge 2 commits into from

Conversation

mcy
Copy link
Contributor

@mcy mcy commented Aug 9, 2021

The debug module is intended to hold debugging helpers, to make debugging Manticore tests easier. This includes:

  • Redactable logging.
  • Error creation capture (e.g., capturing where Err variants are created).

The generated logs can be captured by tests, and eventually get returned through Cerberus's "debug log" functionality.

Right now, manticore::Result is unused. If we decide to go with this design, we'll need to manually update a ton of callsites to use it, and i'm not certain this can be done gradually. I think this will ultimately be worth it, since I won't have to break out GDB to do basic debugging of unit tests. Other than this immediate benefit, it means we can extract fine-grained errors out of Manticore for other purposes.

mcy added 2 commits August 9, 2021 15:16
The `debug` module is intended to hold debugging helpers, to make
debugging Manticore tests easier. This will include:

- Redactable logging.
- Error creation capture (e.g., capturing where `Err` variants are
  created).

The generated logs can be captured by tests, and eventually get returned
through Cerberus's "debug log" functionality.

Signed-off-by: Miguel Young de la Sota <[email protected]>
This type cannot be created except via special macros in the `debug`
module that generate log statements. We may eventually also attach
extra debugging information to errors, and this type is a good place
to do so.

Signed-off-by: Miguel Young de la Sota <[email protected]>
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