MCPcopy
hub / github.com/DerekSelander/LLDB / getType

Function getType

lldb_commands/ds.py:956–981  ·  view source on GitHub ↗
(typeStr, count=None)

Source from the content-addressed store, hash-verified

954 return target.ResolveLoadAddress(address)
955
956def getType(typeStr, count=None):
957 target = getTarget()
958
959 if typeStr.startswith('char'):
960 varType = lldb.eBasicTypeChar
961 elif typeStr.startswith('int'):
962 varType = lldb.eBasicTypeInt
963 elif typeStr.startswith('bool'):
964 varType = lldb.eBasicTypeBool
965 elif typeStr.startswith('double'):
966 varType = lldb.eBasicTypeDouble
967 elif typeStr.startswith('id'):
968 varType = lldb.eBasicTypeObjCID
969 elif typeStr.startswith('class'):
970 varType = lldb.eBasicTypeObjCClass
971 elif typeStr.startswith('void'):
972 varType = lldb.eBasicTypeVoid
973
974 t = target.GetBasicType(varType)
975 for _ in xrange(typeStr.count("*")):
976 t = t.GetPointerType()
977
978 if count:
979 t = t.GetArrayType(count)
980
981 return t
982
983
984def sys(debugger, command, exe_ctx, result, internal_dict):

Callers 9

getIvarsFunction · 0.85
getProtocolsFunction · 0.85
getObjCClassDataFunction · 0.85
getFunctionsFromSectionFunction · 0.85
getObjCSelRefsFunction · 0.85
getCFStringsFromDataFunction · 0.85
getLazyPointersFromDataFunction · 0.85

Calls 1

getTargetFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…