Skip to content

Commit 9ad3413

Browse files
mhagstrandnikic
authored andcommitted
Add print zend string function to gdbinit
1 parent 28f2959 commit 9ad3413

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.gdbinit

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,18 @@ document printzops
554554
dump operands of the current opline
555555
end
556556

557+
define print_zstr
558+
set $zstr = (zend_string *)$arg0
559+
printf "string(%d) ", $zstr->len
560+
____print_str $zstr->val $zstr->len
561+
printf "\n"
562+
end
563+
564+
document print_zstr
565+
print the length and contents of a zend string
566+
usage: print_zstr [ptr]
567+
end
568+
557569
define zbacktrace
558570
____executor_globals
559571
dump_bt $eg.current_execute_data

0 commit comments

Comments
 (0)