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

Refactor qdb #1549

Draft
wants to merge 9 commits into
base: dev
Choose a base branch
from
Draft

Refactor qdb #1549

wants to merge 9 commits into from

Conversation

elicn
Copy link
Member

@elicn elicn commented Mar 19, 2025

qdb refactored from ground up, overall improving feature stability, reliability and maintainability.
Note: some debug prints are still present; waiting for feedback.

Highlights:

  • Misc cosmetic improvements
  • Revised classes and mixin hierarchy to be more intuitive
  • Consolidated and de-duplicated common functionality
  • Heavily commented and documented the code, in addition to annotations
  • Branch prediction greatly improved
    • Assembly analysis now based on Capstone objects rather than unreliable string parsing
    • More corner cases are now covered
    • Prediction target got more accurate
  • Going backwards greatly improved
    • Now also reverting memory layout in addition to memory contents
    • Snapshot memory footprint has been reduced
  • qdb commands can now evaluate compound expressions, e.g. x/8i ($pc + $sp + (4 * $r1))
  • Rewrote all tests to reflect meaningful scenarios
  • Bug fixes

TODO:

  • Redesign classes hierarchy
  • Improve snapshots by covering more operating system resources, such as file descriptors, etc.
  • Make existing commands more resemble to their gdb equivalents
  • Support more commands

Screenshot 1: context dump, predicting branch taken upwards
image

Screenshot 2: examine command taking an expression as its argument
image

@elicn elicn requested a review from ucgJhe March 19, 2025 17:07
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.

None yet

1 participant