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

fixed get_ins_exclude_lib not handling multiple shared objects properly #1317

Merged
merged 9 commits into from Mar 15, 2023

Conversation

anotherdish
Copy link

Checklist

Which kind of PR do you create?

  • This PR only contains minor fixes.
  • This PR contains major feature update.
  • This PR introduces a new function/api for Qiling Framework.

Coding convention?

  • The new code conforms to Qiling Framework naming convention.
  • The imports are arranged properly.
  • Essential comments are added.
  • The reference of the new code is pointed out.

Extra tests?

  • No extra tests are needed for this PR.
  • I have added enough tests for this PR.
  • Tests will be added after some discussion and review.

Changelog?

  • This PR doesn't need to update Changelog.
  • Changelog will be updated after some proper review.
  • Changelog has been updated in my PR.

Target branch?

  • The target branch is dev branch.

One last thing


the current implementation doesnt handle the case where you want to exclude multiple shared objects. also added test cases to catch this bug

me added 2 commits February 24, 2023 15:03
…you want to filter history from multiple shared objects
… history functions to return capstone objects because they are nicer to look at than just integers (addresses)
Copy link
Member

@elicn elicn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, and especially for taking the time to annotate and document everything. I added a few more comments.

qiling/extensions/coverage/formats/history.py Outdated Show resolved Hide resolved
qiling/extensions/coverage/formats/history.py Outdated Show resolved Hide resolved
qiling/extensions/coverage/formats/history.py Outdated Show resolved Hide resolved
qiling/extensions/coverage/formats/history.py Outdated Show resolved Hide resolved
qiling/extensions/coverage/formats/history.py Outdated Show resolved Hide resolved
qiling/extensions/coverage/formats/history.py Outdated Show resolved Hide resolved
@@ -122,13 +132,13 @@ def get_mem_map_from_addr(self, ins: int) -> tuple:
# i sure hope theres not more than one map that contains the instruction lol
return mem_map[0]

def get_regex_matching_exec_maps(self, libs: List) -> List:
def get_regex_matching_exec_maps(self, libs: List[str]) -> List:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like libs should be of type Union[str, Collection[str]] as it accepts both options.

@qilingframework qilingframework deleted a comment from anotherdish Mar 6, 2023
@elicn elicn merged commit 4c9e6b5 into qilingframework:dev Mar 15, 2023
5 checks passed
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

3 participants