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

Try Catch Improvement #4305

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

Try Catch Improvement #4305

wants to merge 5 commits into from

Commits on Feb 23, 2024

  1. Test

    j-barnak committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    893d902 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2024

  1. Configuration menu
    Copy the full SHA
    183571c View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2024

  1. Fixes rizinorg#2247 - Improve try/catch analysis [WIP]

    Your checklist for this pull request
    
    - [x] I've read the guidelines for contributing to this repository
    - [x] I made sure to follow the project's coding style
    - [ ] I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
    - [ ] I've added tests that prove my fix is effective or that my feature works (if possible)
    - [ ] I've updated the rizin book with the relevant information (if needed)
    
    Detailed description
    
    Bin
    
    - Load exception information by default
    
    Analysis
    
    -  Make analyzing exception scopes the default
    -  Analyze all exception sources as functions
    -  Do not hack basic blocks flow to add try/catch information
    
    Graph
    
    - Add an edge pointing to the catch block for each basic block inside the try scope
    -  Add configuration graph.trycatch to control if graphing the exception blocks is enabled
    
    Problems
    
        8ff06e9 Is basically copy-pasted logic from block.c
        This can make graphs a lot noisier
        Cutter will have to implement its own version of the logic if it wants to copy rizin in showing the connection between the blocks and its catch blocks
        I didn't add tests yet
    
    Test plan
    
    Open bins\pe\microsoft_seh_tests\x64\xcpt4.exe for example
    Optional: idp to load debug info for binary
    aaa
    Optional: .iw to show try catch scopes as flags
    s main
    Enter visual graph mode, make sure all edges, lines are painted correctly, and that there area now new edges pointing each basic block to its catch block if it is inside a try scope
    
    Open file from rizinorg#2247
    aaa
    s main
    Enter visual graph mode, make sure issue is fixed
    
    Closing issues
    
    Closes rizinorg#2247
    j-barnak committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    df494ed View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2024

  1. Fixing Errors

    j-barnak committed Mar 3, 2024
    Configuration menu
    Copy the full SHA
    8b7943b View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2024

  1. Configuration menu
    Copy the full SHA
    976d005 View commit details
    Browse the repository at this point in the history