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'])
73 def __init__(self, val): argument
74 self.val = val
77 def to_string(self): argument
78 return self.format_type(self.val)
80 def children(self): argument
81 for field in self.val.type.fields():
82 yield (field.name, self.val[field.name])
84 def format_type(self, t): argument
101 str = self.format_type(types[i])
129 def __init__(self, val): argument
130 self.val = val
132 def to_string(self): argument
133 return self.val.cast(gdb.lookup_type('enum _zend_ast_kind'))
141 def __init__(self, val): argument
142 self.val = val
144 def to_string(self): argument
145 return '((%s*)0x%x)' % (str(self.cast().type), self.val.address)
147 def children(self): argument
148 val = self.cast()
152 num_children = self.num_children()
169 def is_special(self): argument
171 kind = self.val['kind']
174 def is_decl(self): argument
175 return self.is_special() and int(self.val['kind']) >= enum_value('ZEND_AST_FUNC_DECL')
177 def is_list(self): argument
179 kind = self.val['kind']
182 def cast(self): argument
183 kind = int(self.val['kind'])
186 return self.val.cast(gdb.lookup_type('zend_ast_zval'))
188 return self.val.cast(gdb.lookup_type('zend_ast_znode'))
189 if self.is_decl():
190 return self.val.cast(gdb.lookup_type('zend_ast_decl'))
191 if self.is_list():
192 return self.val.cast(gdb.lookup_type('zend_ast_list'))
194 return self.val
196 def num_children(self): argument
197 if self.is_decl():
201 if self.is_special():
203 elif self.is_list():
204 return int(self.cast()['children'])
207 kind = self.val['kind']
216 def __init__(self, val): argument
217 self.val = val
220 def to_string(self): argument
221 return self.value_to_string()
223 def value_to_string(self): argument
224 t = int(self.val['u1']['v']['type'])
234 return str(self.val['value']['lval'])
236 return str(self.val['value']['dval'])
238 return ZendStringPrettyPrinter(self.val['value']['str'].dereference()).to_string()
242 …return 'object(%s)' % ZendStringPrettyPrinter(self.val['value']['obj']['ce']['name'].dereference()…
250 return 'zval of type %d' % int(self.val['u1']['v']['type'])
252 def children(self): argument
253 for field in self.val.type.fields():
255 value = self.val['value']
256 t = int(self.val['u1']['v']['type'])
285 yield ('u2', self.val[field.name]['extra'])
287 yield (field.name, self.val[field.name])