21 fRec = valobj.GetChildMemberWithName(
'fRec')
23 fLength = fRec.GetChildMemberWithName(
'fLength')
24 if fLength.GetValueAsUnsigned(0) <= 0:
26 fBeginningOfData = fRec.GetChildMemberWithName(
'fBeginningOfData')
29 string = fBeginningOfData.AddressOf().GetPointeeData(0, fLength.GetValueAsUnsigned(0))
31 string.Append(lldb.SBData.CreateDataFromInt(0))
33 error = lldb.SBError()
34 string = string.GetString(error, 0)
36 return '<error: ' + error.GetCString() +
'>'
38 return '"' + string +
'"'
48 size = self.
fSize.GetValueAsSigned(0)
50 size =
min(size, 10000)
57 return int(name.lstrip(
'[').rstrip(
']'))
69 return self.
fData.CreateChildAtOffset(
'[' + str(index) +
']', offset, self.
dataType)
93 count = self.
fCount.GetValueAsSigned(0)
95 count =
min(count, 10000)
102 return int(name.lstrip(
'[').rstrip(
']'))
114 return self.
fValue.CreateChildAtOffset(
'[' + str(index) +
']',
122 fArray = self.
valobj.GetChildMemberWithName(
'fArray')
124 ptr = fArray.GetChildMemberWithName(
'__ptr_')
125 self.
fValue = ptr.GetChildMemberWithName(
'__value_')
142 count = self.
fSize.GetValueAsSigned(0)
143 count =
max(count, 0)
144 count =
min(count, 10000)
151 return int(name.lstrip(
'[').rstrip(
']'))
163 return self.
fPtr.CreateChildAtOffset(
'[' + str(index) +
']',
188 return self.
fPtr.GetNumChildren()
192 return self.
fPtr.GetChildAtIndex(index)
197 return self.
fPtr.GetIndexOfChildWithName(name)
206def __lldb_init_module(debugger, dict):
207 debugger.HandleCommand(
208 'type summary add -F skia.SkString_SummaryProvider "SkString" -w skia')
209 debugger.HandleCommand(
210 'type synthetic add -l skia.sk_sp_SynthProvider -x "^sk_sp<.+>$" -w skia')
211 debugger.HandleCommand(
212 'type summary add --summary-string "fPtr = ${var.fPtr}" -x "^sk_sp<.+>$" -w skia')
213 debugger.HandleCommand(
214 'type synthetic add -l skia.SkTArray_SynthProvider -x "^skia_private::S?TArray<.+>$" -w skia')
215 debugger.HandleCommand(
216 'type synthetic add -l skia.SkSpan_SynthProvider -x "^SkSpan<.+>$" -w skia')
217 debugger.HandleCommand(
218 'type summary add --summary-string "size=${svar%#}" -e -x "^skia_private::S?TArray<.+>$" -w skia')
219 debugger.HandleCommand(
220 'type synthetic add -l skia.AutoTArray_SynthProvider -x "^skia_private::AutoS?TArray<.+>$" -w skia')
221 debugger.HandleCommand(
222 'type summary add --summary-string "size=${svar%#}" -e -x "^skia_private::AutoS?TArray<.+>$" -w skia')
223 debugger.HandleCommand(
224 'type summary add --python-script "v = valobj.GetValueAsSigned(0);return str(v) + \' (\' + str(v/65536.0) + \')\';" SkFixed')
225 debugger.HandleCommand(
"type category enable skia")
def get_child_index(self, name)
def __init__(self, valobj, dict)
def get_child_at_index(self, index)
def get_child_at_index(self, index)
def __init__(self, valobj, dict)
def get_child_index(self, name)
def get_child_at_index(self, index)
def __init__(self, valobj, dict)
def get_child_index(self, name)
def get_child_index(self, name)
def get_child_at_index(self, index)
def __init__(self, valobj, dict)
static float max(float r, float g, float b)
static float min(float r, float g, float b)
static Dart_TypedData_Type GetType(intptr_t class_id)
def SkString_SummaryProvider(valobj, dict)