mirror of
https://github.com/cemu-project/idapython.git
synced 2024-11-28 12:04:19 +01:00
109158fabb
- Added AskUsingForm() with embedded forms support (check ex_askusingform.py example and formchooser.py in the SDK) - Added idautils.DecodePreviousInstruction() / DecodePrecedingInstruction() - Added idc.BeginTypeUpdating() / EndTypeUpdating() for fast batch type update operations - Added more IDP callbacks - Added UI_Hooks with a few notification events - Added idaapi.process_ui_action() / idc.ProcessUiAction() - Added netnode.index() to get netnode number - Better handling of ea_t values with bitwise negation - Execute statement hotkey (Ctrl-F3), script timeout, and other options are now configurable with Python.cfg - bugfix: idaapi.msg() / error() and warning() so they don't accept vararg - bugfix: processor_t.id constants were incorrect - bugfix: get_debug_names() was broken with IDA64 - Various bugfixes
27 lines
686 B
Python
27 lines
686 B
Python
#
|
|
# Reference Lister
|
|
#
|
|
# List all functions and all references to them in the current section.
|
|
#
|
|
# Implemented with the idautils module
|
|
#
|
|
from idautils import *
|
|
|
|
def main():
|
|
# Get current ea
|
|
ea = ScreenEA()
|
|
if ea == idaapi.BADADDR:
|
|
print("Could not get get_screen_ea()")
|
|
return
|
|
|
|
# Loop from start to end in the current segment
|
|
for funcea in Functions(SegStart(ea), SegEnd(ea)):
|
|
print("Function %s at 0x%x" % (GetFunctionName(funcea), funcea))
|
|
|
|
# Find all code references to funcea
|
|
for ref in CodeRefsTo(funcea, 1):
|
|
print(" called from %s(0x%x)" % (GetFunctionName(ref), ref))
|
|
|
|
|
|
if __name__=='__main__':
|
|
main() |