-
Notifications
You must be signed in to change notification settings - Fork 641
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
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 |
|
current progress |
|
currently I see: The first is due to not loading the resource, the second is to be investigated :) |
f9d5b1d to
34488b3
Compare
|
apparently
edit: we can disable Lumina on a per-session basis either by:
|
f6f9844 to
0d44fc5
Compare
🙈 oh oh... good finds here, thanks! |
see #2742 in which Lumina names overwrote names provided by debug info
see #2742 in which Lumina names overwrote names provided by debug info
1e87080 to
28d107c
Compare
|
i'll triage these final IDA 9.0 failures tomorrow. i wonder if argv isn't supported in idalib for 9.0. |
|
sure enough 9.1 added support for argv for idalib: https://docs.hex-rays.com/release-notes/9_1 so we should xfail those tests on 9.0 (and/or use 9.1) |
|
I'd say we use 9.1 instead of 9.0. |
|
i think this is ready to merge @mr-tz |
mr-tz
left a comment
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.
almost good to go IMHO
58af432 to
4bea577
Compare
see #2742 in which Lumina names overwrote names provided by debug info
somehow we were extracting alternate names but not function names
9.0 doesn't support disabling lumina (or loading resources, for that matter, too)
6961ee1 to
d1fc844
Compare
|
assuming tests pass (just rebased), this is ready to go. |
|
i'll have a follow-up PR to migrate the code to use the Domain API, which is cleaner and more idiomatic, and probably worth using instead of the low level IDA Python SDK. |
|
Great work. This is a huge improvement! |






closes #2740
TODO:
inf_get_ostype()to help OS detection for ELF filesChecklist