contrib: Add ptdrgn.py script to run interactively via ptpython #309
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I finally got around to getting Drgn working with ptpython and it's pretty glorious. One particular item that's great is that it has a good multi-line code editor, so you can write multi-line loops, etc, and get automatic indentation, and you can go back and fix mistakes prior to the current line. I added in C syntax highlighting for Drgn objects + types, and I'd like to at some point get it to do completion for object members.
The actual code doing it was just going to live in
~/bin/ptdrgn
, but I figured I could at least share it. It's full of hacks and implementation details, but this is thecontrib
directory, so maaaybe it's ok?