Lines Matching refs:self

38     def __init__(self, val):  argument
39 self.val = val
41 def to_string(self): argument
42 return self.format_string()
44 def children(self): argument
45 for field in self.val.type.fields():
47 yield ('val', self.format_string())
49 yield (field.name, self.val[field.name])
51 def format_string(self): argument
52 len = int(self.val['len'])
60 str = self.val['val'].cast(ptr_type).dereference().cast(ary_type)
63 str += ' (%d bytes total)' % int(self.val['len'])
79 def __init__(self, val): argument
80 self.val = val
83 def to_string(self): argument
84 return self.format_type(self.val)
86 def children(self): argument
87 for field in self.val.type.fields():
88 yield (field.name, self.val[field.name])
90 def format_type(self, t): argument
107 str = self.format_type(types[i])
135 def __init__(self, val): argument
136 self.val = val
138 def to_string(self): argument
139 return self.val.cast(gdb.lookup_type('enum _zend_ast_kind'))
147 def __init__(self, val): argument
148 self.val = val
150 def to_string(self): argument
151 return '((%s*)0x%x)' % (str(self.cast().type), self.val.address)
153 def children(self): argument
154 val = self.cast()
158 num_children = self.num_children()
175 def is_special(self): argument
177 kind = self.val['kind']
180 def is_decl(self): argument
181 return self.is_special() and int(self.val['kind']) >= enum_value('ZEND_AST_FUNC_DECL')
183 def is_list(self): argument
185 kind = self.val['kind']
188 def cast(self): argument
189 kind = int(self.val['kind'])
192 return self.val.cast(gdb.lookup_type('zend_ast_zval'))
194 return self.val.cast(gdb.lookup_type('zend_ast_znode'))
195 if self.is_decl():
196 return self.val.cast(gdb.lookup_type('zend_ast_decl'))
197 if self.is_list():
198 return self.val.cast(gdb.lookup_type('zend_ast_list'))
200 return self.val
202 def num_children(self): argument
203 if self.is_decl():
207 if self.is_special():
209 elif self.is_list():
210 return int(self.cast()['children'])
213 kind = self.val['kind']
222 def __init__(self, val): argument
223 self.val = val
226 def to_string(self): argument
227 return self.value_to_string()
229 def value_to_string(self): argument
230 t = int(self.val['u1']['v']['type'])
240 return str(self.val['value']['lval'])
242 return str(self.val['value']['dval'])
244 return ZendStringPrettyPrinter(self.val['value']['str'].dereference()).to_string()
248 …return 'object(%s)' % ZendStringPrettyPrinter(self.val['value']['obj']['ce']['name'].dereference()…
256 return 'zval of type %d' % int(self.val['u1']['v']['type'])
258 def children(self): argument
259 for field in self.val.type.fields():
261 value = self.val['value']
262 t = int(self.val['u1']['v']['type'])
291 yield ('u2', self.val[field.name]['extra'])
293 yield (field.name, self.val[field.name])
304 def __init__(self, val): argument
305 self.val = val
307 def to_string(self): argument
308 return zendStringPointerPrinter(self.val['name'])
310 def children(self): argument
311 for field in self.val.type.fields():
313 if field.name in self.STRING_FIELDS:
314 yield (field.name, zendStringPointerPrinter(self.val[field.name]))
316 yield (field.name, self.val[field.name])
323 yield ('<anonymous>', self.val[field])
330 def __init__(self, val): argument
331 self.val = val
333 def children(self): argument
334 for field in self.val.type.fields():
336 yield ('doc_comment', zendStringPointerPrinter(self.val['doc_comment']))
338 yield ('ce', zendStringPointerPrinter(self.val['ce']['name']))
340 yield (field.name, self.val[field.name])