@@ -67,7 +67,8 @@ def extended_classname(tip):
6767 read_string = lldb .debugger .GetSelectedTarget ().GetProcess ().ReadCStringFromMemory (str_ptr , 0x1000 , error )
6868
6969 if not error .Success ():
70- raise DebuggerException ()
70+ # raise DebuggerException()
71+ return None
7172
7273 TYPES_CLASSNAME [tip ] = read_string
7374 return read_string
@@ -234,15 +235,13 @@ def _read_value(self, index):
234235 def _create_synthetic_child (self , name ):
235236 index = self .get_child_index (name )
236237 type_info = self ._child_info (index )
237- # if str(name) == "allNames":
238- # print "allNames: "+ str(type_info.type) +"/"+ str(type_info.offset)
239-
240238 value = self ._valobj .CreateChildAtOffset (str (name ),
241239 type_info .offset ,
242240 self ._type_generator (type_info .type ))
243241
244242 value .SetSyntheticChildrenGenerated (True )
245243 value .SetPreferSyntheticValue (True )
244+
246245 return value
247246
248247class KonanStringSyntheticProvider :
@@ -254,7 +253,6 @@ def __init__(self, valobj, type_check_result):
254253 return
255254
256255 process = lldb .debugger .GetSelectedTarget ().GetProcess ()
257-
258256 error = lldb .SBError ()
259257 s = process .ReadCStringFromMemory (debug_string_buffer_ptr (), int (buff_len ), error )
260258 if not error .Success ():
@@ -327,7 +325,7 @@ def __init__(self, name, type, offset):
327325 self .type = type
328326 self .offset = offset
329327
330- #Cap array results to prevent super slow response
328+ #Cap array results to prevent slow response with large lists
331329MAX_VALUES = 20
332330
333331class KonanArraySyntheticProvider (KonanHelperProvider ):
@@ -373,7 +371,6 @@ def get_child_index(self, name):
373371 def to_string (self ):
374372 return [self .system_count_children ()]
375373
376- STRING_TYPE = - 1
377374ARRAY_TYPE = - 2
378375NO_TYPE_KNOWN = - 3
379376STRING_SIZE_OFFSET = 10
@@ -418,22 +415,4 @@ def __lldb_init_module(debugger, _):
418415 ' )
419416
420417 debugger .HandleCommand ('type category enable Kotlin' )
421- debugger .HandleCommand ('command script add -f {}.print_this_command print_this' .format (__name__ ))
422-
423- def print_lldb_sbval (lldb_val ):
424- print "GetName: " + str (lldb_val .GetName ()) + ", " + \
425- "GetData: " + str (lldb_val .GetData ()) + ", " + \
426- "IsValid: " + str (lldb_val .IsValid ()) + ", " + \
427- "GetError: " + str (lldb_val .GetError ()) + ", " + \
428- "GetID: " + str (lldb_val .GetID ()) + ", " + \
429- "GetTypeName: " + str (lldb_val .GetTypeName ()) + ", " + \
430- "GetDisplayTypeName: " + str (lldb_val .GetDisplayTypeName ()) + ", " + \
431- "GetByteSize: " + str (lldb_val .GetByteSize ()) + ", " + \
432- "IsInScope: " + str (lldb_val .IsInScope ()) + ", " + \
433- "GetFormat: " + str (lldb_val .GetFormat ()) + ", " + \
434- "GetValue: " + str (lldb_val .GetValue ()) + ", " + \
435- "GetValueAsSigned: " + str (lldb_val .GetValueAsSigned ()) + ", " + \
436- "GetValueAsUnsigned: " + str (lldb_val .GetValueAsUnsigned ()) + ", " + \
437- "GetValueType: " + str (lldb_val .GetValueType ()) + ", " + \
438- "GetValueDidChange: " + str (lldb_val .GetValueDidChange ()) + ", " + \
439- "GetSummary: " + str (lldb_val .GetSummary ())
418+ debugger .HandleCommand ('command script add -f {}.print_this_command print_this' .format (__name__ ))
0 commit comments