Skip to content

fixes loader IDA-7 compatibility#39

Merged
gitoleg merged 3 commits into
BinaryAnalysisPlatform:masterfrom
gitoleg:fix-loader
Apr 5, 2019
Merged

fixes loader IDA-7 compatibility#39
gitoleg merged 3 commits into
BinaryAnalysisPlatform:masterfrom
gitoleg:fix-loader

Conversation

@gitoleg
Copy link
Copy Markdown
Contributor

@gitoleg gitoleg commented Feb 15, 2019

This PR fixes a bug in loader script due to compatibility with IDA-7 version.

The core of the problem is in get_segm_name function, which exists both in 6.9 and 7.1 versions, but was shadowed with some other implementation in the latter one.

Copy link
Copy Markdown
Member

@ivg ivg left a comment

Choose a reason for hiding this comment

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

Please, don't import *, it will pollute namespace and make it very fragile to the new changes (if it didn't break the code already), do a guarded import, e.g.,

try:
   from idaapi import get_segm_name as idat_segm_name
except ImportError:
   from idc import get_segm_name as ida_segm_name

@gitoleg gitoleg merged commit 2bd0cde into BinaryAnalysisPlatform:master Apr 5, 2019
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.

2 participants