Exemplo n.º 1
0
 def set_metadata(self, lldb_obj: lldb.SBValue):
     self.__dict__["@type_name"] = lldb_obj.GetTypeName()
     self.__dict__["@location"] = lldb_obj.GetLocation()
     if lldb_obj.GetNumChildren() == 0:
         self.__dict__["@value"] = lldb_obj.GetValue()
         self.__dict__["@value_unsigned"] = lldb_obj.GetValueAsUnsigned()
         self.__dict__["@value_signed"] = lldb_obj.GetValueAsSigned()
Exemplo n.º 2
0
def addOneShotBreakPointInIMP(imp: lldb.SBValue, callbackFunc: str,
                              name: str) -> None:
    target = lldb.debugger.GetSelectedTarget()
    bp = target.BreakpointCreateByAddress(imp.GetValueAsUnsigned())
    bp.AddName(name)
    bp.SetOneShot(True)
    bp.SetScriptCallbackFunction(callbackFunc)