Repository navigation
Conversation
…andiant#3222) IDA 9.4 deprecated the pointer-based function and segment APIs. Use the EA-based replacements when available, and keep the legacy calls for IDA 9.2/9.3.
…tion-warnings # Conflicts: # CHANGELOG.md
Contributor
Author
|
Merged \origin/master\ into this branch and resolved the \CHANGELOG.md\ conflict. The PR branch has been updated with a regular push (no force-push). |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Closes #3222.
IDA 9.4 deprecated the pointer-based IDAPython function and segment APIs, and IDA 9.5 keeps emitting the warnings. This change detects the EA-based APIs once at the top of the IDA helper modules and selects them when available, while preserving the existing pointer-based calls for IDA 9.2/9.3:
getnseg()->get_segment_info_by_num()getseg()->get_segment_info()get_segm_name()->get_segment_name()get_func()->get_func_start()/get_func_entry_info()get_func_cmt()->get_func_cmt_ea()update_func()->set_func_flag()in the idalib fixtureFunction flow charts use
qflow_chart_ea_ton IDA 9.4+ so function tail chunks are still included, matching the previousFlowChart(func_t)behavior. The interactive plugin andscripts/import-to-ida.pywere updated as well, so the warnings are not only avoided on the test path.A new idalib test exercises the compatibility helpers on the installed IDA version; the CI matrix covers IDA 9.2, 9.3, 9.4, and latest.
Tests
pytest -q tests/test_engine.py tests/test_helpers.py tests/test_fmt.py tests/test_strings.py tests/test_optimizer.py tests/test_fixture_manifests.py tests/test_rule_cache.py tests/test_rules_insn_scope.py: 45 passed, 1 failed only because thetests/datasubmodule is not checked out locally (tests/test_helpers.py::test_load_one_jsonl_from_path_gz).ruff format --checkandruff checkon the changed files: pass.mypy --check-untyped-defs --ignore-missing-importson the changed files: no new errors (pre-existing third-party stub / Qt stub errors remain).tests/test_idalib_features.pycould not be run here. CI will run it on all four IDA versions. The interactive plugin UI was not launched locally.Checklist
AI disclosure
Portions of this change were drafted with AI assistance. The submitter reviewed the diff, ran the available checks, and takes responsibility for the change.