def GetPrevConst(enum_id, value, bmask):
"""
Get prev constant in the enum
@param enum_id: id of enum
@param bmask : bitmask of the constant
ordinary enums accept only -1 as a bitmask
@param value: value of the current constant
@return: value of a constant with value lower than the specified
value. -1 no such constants exist.
All constants are sorted by their values as unsigned longs.
"""
if bmask < 0:
bmask &= BADADDR
return idaapi.get_prev_enum_member(enum_id, value, bmask)
评论列表
文章目录