-
Notifications
You must be signed in to change notification settings - Fork 627
tests: add feature tests for idalib #2742
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add bug fixes, new features, breaking changes and anything else you think is worthwhile mentioning to the master (unreleased) section of CHANGELOG.md. If no CHANGELOG update is needed add the following to the PR description: [x] No CHANGELOG update needed
CHANGELOG updated or no update needed, thanks! 😄
|
IDA recognizes this as a library function, so we'd better pick a different function: 0x401100 basic block 0x401130 for example. |
apparently "Alternative Names" are just stored in the function comment: def get_alternative_names(ea):
"""Get all alternative names for an address."""
alt_names = []
# Check indented comment
cmt = ida_bytes.get_cmt(ea, False) # False = non-repeatable
if cmt:
for line in cmt.split('\n'):
if line.startswith("Alternative name is '") and line.endswith("'"):
name = line[21:-1] # Extract name between quotes
alt_names.append(name)
# Check function comment
pfn = ida_funcs.get_func(ea)
if pfn:
func_cmt = ida_funcs.get_func_cmt(pfn, False)
if func_cmt:
for line in func_cmt.split('\n'):
if line.startswith("Alternative name is '") and line.endswith("'"):
name = line[21:-1]
alt_names.append(name)
return alt_names |




closes #2740
TODO:
Checklist