Skip to content

Commit 7f87700

Browse files
committed
Add GDB pretty-printers for zend_string, zend_type
1 parent 4058082 commit 7f87700

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.gdb.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ def to_string(self):
3232

3333
def children(self):
3434
for field in self.val.type.fields():
35-
yield (field.name, self.val[field.name])
35+
if field.name == 'val':
36+
yield ('val', self.format_string())
37+
else:
38+
yield (field.name, self.val[field.name])
3639

3740
def format_string(self):
3841
len = int(self.val['len'])

0 commit comments

Comments
 (0)