Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jul 8, 2025. It is now read-only.

Fix the APIs idautils.CodeRefsTo() and idautils.CodeRefsFrom()#102

Merged
williballenthin merged 2 commits intowilliballenthin:masterwilliballenthin/python-idb:masterfrom
bjchan9an:masterbjchan9an/python-idb:masterCopy head branch name to clipboard
Nov 24, 2020
Merged

Fix the APIs idautils.CodeRefsTo() and idautils.CodeRefsFrom()#102
williballenthin merged 2 commits intowilliballenthin:masterwilliballenthin/python-idb:masterfrom
bjchan9an:masterbjchan9an/python-idb:masterCopy head branch name to clipboard

Conversation

@bjchan9an
Copy link
Contributor

In the issue #72, we found that the implementation of CodeRefsTo() excludes all call type cross-references, which is inconsistent with the results of CodeRefsTo() in IDA Pro 7.0.

# a code xref is like a fallthrough or jump, not like a call.
for xref in idb.analysis.get_crefs_to(self.idb, ea,
     types=[idaapi.fl_JN, idaapi.fl_JF, idaapi.fl_F]):
     yield xref.frm

According to the comment, the developers excluded the calling flows. However, we found that the CodeRefsTo should include the calling flows according to an example in the idapython project (link). In the code, they use CodeRefsTo to find all callers of the target function. Thus, we modify the implementation of CodeRefsTo (also the CodeRefsFrom) to include the call flows.

@williballenthin
Copy link
Owner

thank you!

@williballenthin williballenthin merged commit df6cc50 into williballenthin:master Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.