def _priority_paint(self):
"""
Immediately repaint regions of the database visible to the user.
"""
cursor_address = idaapi.get_screen_ea() # TODO: threadsafe?
# paint functions around the cursor address
painted = self._priority_paint_functions(cursor_address)
# the operation has been interrupted by a repaint request
if self._repaint_requested:
return False
# paint instructions around the cursor address
self._priority_paint_instructions(cursor_address, ignore=painted)
# the operation has been interrupted by a repaint request
if self._repaint_requested:
return False
# succesful completion
return True
python类get_screen_ea()的实例源码
def get_cursor_func_ref():
current_tform = idaapi.get_current_tform()
tform_type = idaapi.get_tform_type(current_tform)
# get the hexrays vdui (if available)
vu = idaapi.get_tform_vdui(current_tform)
if vu:
cursor_addr = vu.item.get_ea()
elif tform_type == idaapi.BWN_DISASM:
cursor_addr = idaapi.get_screen_ea()
op_addr = idc.GetOperandValue(cursor_addr, idaapi.get_opnum())
op_func = idaapi.get_func(op_addr)
if op_func and op_func.startEA == op_addr:
return op_addr
else:
return idaapi.BADADDR
cursor_func = idaapi.get_func(cursor_addr)
if cursor_func and cursor_func.startEA == cursor_addr:
return cursor_addr
return idaapi.BADADDR
def address(cls):
"""Current address"""
return idaapi.get_screen_ea()
def ScreenEA():
"""
Get linear address of cursor
"""
return idaapi.get_screen_ea()