-
Notifications
You must be signed in to change notification settings - Fork 274
Add a pretty printer for irept #4960
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
Add a pretty printer for irept #4960
Conversation
That's really useful, thanks! Did CLion give anything useful in regards to errors or just not work? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
Passed Diffblue compatibility checks (cbmc commit: e1e5092).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/121127968
Example output:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work correctly in CLion, but it looks to be a CLion bug as using p
on gdb directly produces the expected result - nice!
It does however need adding so people get the advantage
@@ -1,6 +1,43 @@ | |||
import gdb | |||
|
|||
|
|||
def deconstruct_dstring(val): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️ Probably would have been easier to review if the refactoring of printing dstring was separate to the introduction of irep printing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That might be slightly overkill - the changes can be read top-to-bottom - only the last hunk is not related to this refactoring.
This is the pretty printer for irept that I use. It works in GDB directly but not in CLion and is therefore not enabled in this PR (users can adjust the load_cbmc_printers function to enable it). @JohnDumbell is planning on doing a full pretty printer for irept soon so having this in the code base may be a useful first step.