Exemplo n.º 1
0
 def valueof(name, default=0):
     """
     Returns the numeric value of a given name string.
     If the name could not be resolved then the default value will be returned
     """
     t, v = _ida_name.get_name_value(_ida_idaapi.BADADDR, name)
     if t == 0: # NT_NONE
       v = default
     return v
Exemplo n.º 2
0
 def valueof(name, default=0):
     """
     Returns the numeric value of a given name string.
     If the name could not be resolved then the default value will be returned
     """
     t, v = _ida_name.get_name_value(_ida_idaapi.BADADDR, name)
     if t == 0: # NT_NONE
       v = default
     return v
Exemplo n.º 3
0
def get_name_value(*args) -> "uval_t *":
    r"""
    get_name_value(_from, name) -> int


    Get value of the name. This function knows about: regular names,
    enums, special segments, etc.
    
    @param _from: linear address where the name is used if not applicable,
                  then should be BADADDR (C++: ea_t)
    @param name: any name in the program or NULL (C++: const char *)
    @return: Name value result codes
    """
    return _ida_name.get_name_value(*args)
Exemplo n.º 4
0
def get_name_value(*args):
    """
  get_name_value(_from, name) -> int
  """
    return _ida_name.get_name_value(*args)