Lines Matching refs:self

114 	def __init__(self,rot_pointer,params):  argument
117 self.sys_params = params
118 self.valobj = rot_pointer
121 self.instanceSize = None # lazy fetching
122 offset = 24 if self.sys_params.is_64_bit else 16
124self.namePointer = Utilities.read_child_of(self.valobj,offset,self.sys_params.types_cache.addr_ptr…
125 self.valid = 1 # self.check_valid()
128 self.valid = 0
129 if self.valid:
130 self.name = Utilities.read_ascii(self.valobj.GetTarget().GetProcess(),self.namePointer)
131 if not(Utilities.is_valid_identifier(self.name)):
133 self.valid = 0
136 def check_valid(self): argument
137 self.valid = 1
143 def __str__(self): argument
146 "instanceSize = " + hex(self.instance_size()) + "\n" + \
147 "namePointer = " + hex(self.namePointer) + " --> " + self.name
149 def is_valid(self): argument
150 return self.valid
152 def instance_size(self,align=0): argument
154 if self.is_valid() == 0:
156 if self.instanceSize is None:
157 self.instanceSize = Utilities.read_child_of(self.valobj,8,self.sys_params.types_cache.uint32_t)
159 unalign = self.instance_size(0)
160 if self.sys_params.is_64_bit:
165 return self.instanceSize
168 def __init__(self,rwt_pointer,params): argument
171 self.sys_params = params
172 self.valobj = rwt_pointer
175 self.roPointer = Utilities.read_child_of(self.valobj,8,self.sys_params.types_cache.addr_ptr_type)
176 self.check_valid()
179 self.valid = 0
180 if self.valid:
181self.rot = self.valobj.CreateValueFromData("rot",lldb.SBData.CreateDataFromUInt64Array(self.sys_pa…
183 self.data = RoT_Data(self.rot,self.sys_params)
186 def check_valid(self): argument
188 self.valid = 1
189 if not(Utilities.is_valid_pointer(self.roPointer,self.sys_params.pointer_size,allow_tagged=0)):
191 self.valid = 0
193 def __str__(self): argument
196 "roPointer = " + hex(self.roPointer)
198 def is_valid(self): argument
200 if self.valid:
201 return self.data.is_valid()
205 def __init__(self,isa_pointer,params): argument
208 self.sys_params = params
209 self.valobj = isa_pointer
210 self.check_valid()
213 self.valid = 0
214 if self.valid:
215self.rwt = self.valobj.CreateValueFromData("rwt",lldb.SBData.CreateDataFromUInt64Array(self.sys_pa…
217 self.data = RwT_Data(self.rwt,self.sys_params)
222 def check_valid(self): argument
224 self.valid = 1
226 self.isaPointer = Utilities.read_child_of(self.valobj,0,self.sys_params.types_cache.addr_ptr_type)
227 if not(Utilities.is_valid_pointer(self.isaPointer,self.sys_params.pointer_size,allow_tagged=0)):
229 self.valid = 0
231 if not(Utilities.is_allowed_pointer(self.isaPointer)):
233 self.valid = 0
236self.cachePointer = Utilities.read_child_of(self.valobj,2*self.sys_params.pointer_size,self.sys_pa…
237 if not(Utilities.is_valid_pointer(self.cachePointer,self.sys_params.pointer_size,allow_tagged=0)):
239 self.valid = 0
241 if not(Utilities.is_allowed_pointer(self.cachePointer)):
243 self.valid = 0
245self.dataPointer = Utilities.read_child_of(self.valobj,4*self.sys_params.pointer_size,self.sys_par…
246 if not(Utilities.is_valid_pointer(self.dataPointer,self.sys_params.pointer_size,allow_tagged=0)):
248 self.valid = 0
250 if not(Utilities.is_allowed_pointer(self.dataPointer)):
252 self.valid = 0
255self.superclassIsaPointer = Utilities.read_child_of(self.valobj,1*self.sys_params.pointer_size,sel…
256 …if not(Utilities.is_valid_pointer(self.superclassIsaPointer,self.sys_params.pointer_size,allow_tag…
258 self.valid = 0
260 if not(Utilities.is_allowed_pointer(self.superclassIsaPointer)):
262 self.valid = 0
269 def is_kvo(self): argument
271 if self.is_valid():
272 if self.class_name().startswith("NSKVONotifying_"):
280 def is_cftype(self): argument
282 if self.is_valid():
283 return self.class_name() == '__NSCFType' or self.class_name() == 'NSCFType'
285 def get_superclass(self): argument
287 if self.is_valid():
288 parent_isa_pointer = self.valobj.CreateChildAtOffset("parent_isa",
289 self.sys_params.pointer_size,
290 self.sys_params.addr_ptr_type)
291 return Class_Data_V2(parent_isa_pointer,self.sys_params)
295 def class_name(self): argument
297 if self.is_valid():
298 return self.data.data.name
302 def is_valid(self): argument
304 if self.valid:
305 return self.data.is_valid()
308 def __str__(self): argument
310 return 'isaPointer = ' + hex(self.isaPointer) + "\n" + \
311 "superclassIsaPointer = " + hex(self.superclassIsaPointer) + "\n" + \
312 "cachePointer = " + hex(self.cachePointer) + "\n" + \
313 "data = " + hex(self.dataPointer)
315 def is_tagged(self): argument
318 def instance_size(self,align=0): argument
320 if self.is_valid() == 0:
322 return self.rwt.rot.instance_size(align)
326 def __init__(self,isa_pointer,params): argument
329 self.valid = 1
330 self.sys_params = params
331 self.valobj = isa_pointer
332 self.check_valid()
335 self.valid = 0
336 if self.valid:
337 self.name = Utilities.read_ascii(self.valobj.GetTarget().GetProcess(),self.namePointer)
338 if not(Utilities.is_valid_identifier(self.name)):
340 self.valid = 0
343 def check_valid(self): argument
345 self.valid = 1
347 self.isaPointer = Utilities.read_child_of(self.valobj,0,self.sys_params.types_cache.addr_ptr_type)
348 if not(Utilities.is_valid_pointer(self.isaPointer,self.sys_params.pointer_size,allow_tagged=0)):
350 self.valid = 0
353self.superclassIsaPointer = Utilities.read_child_of(self.valobj,1*self.sys_params.pointer_size,sel…
354 …if not(Utilities.is_valid_pointer(self.superclassIsaPointer,self.sys_params.pointer_size,allow_tag…
356 self.valid = 0
359self.namePointer = Utilities.read_child_of(self.valobj,2*self.sys_params.pointer_size,self.sys_par…
368 def is_kvo(self): argument
370 if self.is_valid():
371 if self.class_name().startswith("NSKVONotifying_"):
379 def is_cftype(self): argument
381 if self.is_valid():
382 return self.class_name() == '__NSCFType' or self.class_name() == 'NSCFType'
384 def get_superclass(self): argument
386 if self.is_valid():
387 parent_isa_pointer = self.valobj.CreateChildAtOffset("parent_isa",
388 self.sys_params.pointer_size,
389 self.sys_params.addr_ptr_type)
390 return Class_Data_V1(parent_isa_pointer,self.sys_params)
394 def class_name(self): argument
396 if self.is_valid():
397 return self.name
401 def is_valid(self): argument
402 return self.valid
404 def __str__(self): argument
406 return 'isaPointer = ' + hex(self.isaPointer) + "\n" + \
407 "superclassIsaPointer = " + hex(self.superclassIsaPointer) + "\n" + \
408 "namePointer = " + hex(self.namePointer) + " --> " + self.name + \
409 "instanceSize = " + hex(self.instanceSize()) + "\n"
411 def is_tagged(self): argument
414 def instance_size(self,align=0): argument
416 if self.is_valid() == 0:
418 if self.instanceSize is None:
419self.instanceSize = Utilities.read_child_of(self.valobj,5*self.sys_params.pointer_size,self.sys_pa…
421 unalign = self.instance_size(0)
422 if self.sys_params.is_64_bit:
427 return self.instanceSize
444 def __init__(self,pointer,params): argument
447 self.valid = 1
448 self.name = None
449 self.sys_params = params
450 self.valobj = pointer
451 self.val = (pointer & ~0x0000000000000000FF) >> 8
452 self.class_bits = (pointer & 0xE) >> 1
453 self.i_bits = (pointer & 0xF0) >> 4
455 if self.sys_params.is_lion:
456 if self.class_bits in TaggedClass_Values_Lion:
457 self.name = TaggedClass_Values_Lion[self.class_bits]
460 self.valid = 0
462 if self.class_bits in TaggedClass_Values_NMOS:
463 self.name = TaggedClass_Values_NMOS[self.class_bits]
466 self.valid = 0
469 def is_valid(self): argument
470 return self.valid
472 def class_name(self): argument
474 if self.is_valid():
475 return self.name
479 def value(self): argument
480 return self.val if self.is_valid() else None
482 def info_bits(self): argument
483 return self.i_bits if self.is_valid() else None
485 def is_kvo(self): argument
488 def is_cftype(self): argument
494 def get_superclass(self): argument
498 def is_tagged(self): argument
502 def instance_size(self,align=0): argument
504 if self.is_valid() == 0:
506 return self.sys_params.pointer_size
510 def __init__(self): argument
512 def is_valid(self): argument
517 def __init__(self, major, minor, release, build_string): argument
518 self._major = major
519 self._minor = minor
520 self._release = release
521 self._build_string = build_string
523 def get_major(self): argument
524 return self._major
525 def get_minor(self): argument
526 return self._minor
527 def get_release(self): argument
528 return self._release
529 def get_build_string(self): argument
530 return self._build_string
537 def __lt__(self,other): argument
538 if (self.major < other.major):
540 if (self.minor < other.minor):
542 if (self.release < other.release):
548 def __eq__(self,other): argument
549 return (self.major == other.major) and \
550 (self.minor == other.minor) and \
551 (self.release == other.release) and \
552 (self.build_string == other.build_string)
556 def __gt__(self, other): argument
557 return other < self
559 def __le__(self, other): argument
560 return not other < self
562 def __ge__(self, other): argument
563 return not self < other
572 def __init__(self,valobj): argument
574 self.adjust_for_architecture(valobj)
575 self.adjust_for_process(valobj)
577 def adjust_for_process(self, valobj): argument
585self.pid = process.GetUniqueID() # using the unique ID for added guarantees (see svn revision 1726…
587 if runtime_version.look_for_key(self.pid):
588 self.runtime_version = runtime_version.get_value(self.pid)
590 self.runtime_version = ObjCRuntime.runtime_version(process)
591 runtime_version.add_item(self.pid,self.runtime_version)
593 if os_version.look_for_key(self.pid):
594 self.is_lion = os_version.get_value(self.pid)
596 self.is_lion = Utilities.check_is_osx_lion(valobj.GetTarget())
597 os_version.add_item(self.pid,self.is_lion)
599 if types_caches.look_for_key(self.pid):
600 self.types_cache = types_caches.get_value(self.pid)
602 self.types_cache = lldb.formatters.attrib_fromdict.AttributesDictionary(allow_reset=0)
603 self.types_cache.addr_type = valobj.GetType().GetBasicType(lldb.eBasicTypeUnsignedLong)
604 self.types_cache.addr_ptr_type = self.types_cache.addr_type.GetPointerType()
605 self.types_cache.uint32_t = valobj.GetType().GetBasicType(lldb.eBasicTypeUnsignedInt)
606 types_caches.add_item(self.pid,self.types_cache)
608 if isa_caches.look_for_key(self.pid):
609 self.isa_cache = isa_caches.get_value(self.pid)
611 self.isa_cache = lldb.formatters.cache.Cache()
612 isa_caches.add_item(self.pid,self.isa_cache)
614 def adjust_for_architecture(self,valobj): argument
616 self.pointer_size = process.GetAddressByteSize()
617 self.is_64_bit = (self.pointer_size == 8)
618 self.endianness = process.GetByteOrder()
619 self.is_little = (self.endianness == lldb.eByteOrderLittle)
620 self.cfruntime_size = 16 if self.is_64_bit else 8
627 def calculate_offset(self, num_pointers = 0, bytes_count = 0, padding32 = 0, padding64 = 0): argument
628 value = bytes_count + num_pointers*self.pointer_size
629 return value + padding64 if self.is_64_bit else value + padding32
673 def __init__(self,valobj): argument
675 self.valobj = valobj
676 self.adjust_for_architecture()
677 self.sys_params = SystemParameters(self.valobj)
678 self.unsigned_value = self.valobj.GetValueAsUnsigned()
679 self.isa_value = None
681 def adjust_for_architecture(self): argument
685 def is_tagged(self): argument
687 if self.valobj is None:
689 …return (Utilities.is_valid_pointer(self.unsigned_value,self.sys_params.pointer_size, allow_tagged=…
690 not(Utilities.is_valid_pointer(self.unsigned_value,self.sys_params.pointer_size, allow_tagged=0)))
692 def is_valid(self): argument
694 if self.valobj is None:
696 if self.valobj.IsInScope() == 0:
698 …return Utilities.is_valid_pointer(self.unsigned_value,self.sys_params.pointer_size, allow_tagged=1)
700 def is_nil(self): argument
701 return self.unsigned_value == 0
703 def read_isa(self): argument
705 if self.isa_value != None:
707 return self.isa_value
708 self.isa_pointer = self.valobj.CreateChildAtOffset("cfisa",
710 self.sys_params.types_cache.addr_ptr_type)
711 if self.isa_pointer is None or self.isa_pointer.IsValid() == 0:
714 self.isa_value = self.isa_pointer.GetValueAsUnsigned(1)
715 if self.isa_value == 1:
720 def read_class_data(self): argument
723 if self.is_tagged():
725 if self.sys_params.runtime_version == 2:
730 tentative_tagged = TaggedClass_Data(self.unsigned_value,self.sys_params)
740 if self.is_valid() == 0 or self.read_isa() is None:
742 data = self.sys_params.isa_cache.get_value(self.isa_value,default=None)
745 if self.sys_params.runtime_version == 2:
746 data = Class_Data_V2(self.isa_pointer,self.sys_params)
748 data = Class_Data_V1(self.isa_pointer,self.sys_params)
752 self.sys_params.isa_cache.add_item(self.isa_value,data,ok_to_replace=1)
757 def message(self): argument
762 def __init__(self,nil): argument
763 self.is_nil = nil
765 def message(self): argument
766 if self.is_nil:
773 def __init__(self): argument
776 def message(self): argument
780 def message(self): argument