From b28192414987f985a39076a8874eadfba758e50c Mon Sep 17 00:00:00 2001 From: Elias Bachaalany Date: Sat, 20 May 2023 13:33:04 -0700 Subject: [PATCH] idautils: don't use `cvar`, use the helper functions (#52) --- python/idautils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/idautils.py b/python/idautils.py index e95166d..fad8964 100644 --- a/python/idautils.py +++ b/python/idautils.py @@ -185,8 +185,8 @@ def Heads(start=None, end=None): @return: list of heads between start and end """ - if start is None: start = ida_ida.cvar.inf.min_ea - if end is None: end = ida_ida.cvar.inf.max_ea + if start is None: start = ida_ida.inf_get_min_ea() + if end is None: end = ida_ida.inf_get_max_ea() ea = start if not idc.is_head(ida_bytes.get_flags(ea)): @@ -210,8 +210,8 @@ def Functions(start=None, end=None): in multiple segments will be reported multiple times, once in each segment as they are listed. """ - if start is None: start = ida_ida.cvar.inf.min_ea - if end is None: end = ida_ida.cvar.inf.max_ea + if start is None: start = ida_ida.inf_get_min_ea() + if end is None: end = ida_ida.inf_get_max_ea() # find first function head chunk in the range chunk = ida_funcs.get_fchunk(start)