Skip to content

Commit 8ba6d62

Browse files
mhagstrandnikic
authored andcommitted
Removing zmemcheck from .gdbinit
It doesn't seem to make sense anymore
1 parent f9226f9 commit 8ba6d62

File tree

1 file changed

+0
-73
lines changed

1 file changed

+0
-73
lines changed

.gdbinit

-73
Original file line numberDiff line numberDiff line change
@@ -610,79 +610,6 @@ document zbacktrace
610610
> (gdb) dump_bt $eg.current_execute_data
611611
end
612612

613-
define zmemcheck
614-
set $p = alloc_globals.head
615-
set $stat = "?"
616-
set $total_size = 0
617-
if $arg0 != 0
618-
set $not_found = 1
619-
else
620-
set $not_found = 0
621-
end
622-
printf " block size status file:line\n"
623-
printf "-------------------------------------------------------------------------------\n"
624-
while $p
625-
set $aptr = $p + sizeof(struct _zend_mem_header) + sizeof(align_test)
626-
if $arg0 == 0 || (void *)$aptr == (void *)$arg0
627-
if $p->magic == 0x7312f8dc
628-
set $stat = "OK"
629-
end
630-
if $p->magic == 0x99954317
631-
set $stat = "FREED"
632-
end
633-
if $p->magic == 0xfb8277dc
634-
set $stat = "CACHED"
635-
end
636-
set $filename = strrchr($p->filename->val, '/')
637-
if !$filename
638-
set $filename = $p->filename->val
639-
else
640-
set $filename = $filename + 1
641-
end
642-
printf " %p ", $aptr
643-
if $p->size == sizeof(struct _zval_struct) && ((struct _zval_struct *)$aptr)->type >= 0 && ((struct _zval_struct *)$aptr)->type < 10
644-
printf "ZVAL?(%-2d) ", $p->size
645-
else
646-
printf "%-9d ", $p->size
647-
end
648-
set $total_size = $total_size + $p->size
649-
printf "%-06s %s:%d", $stat, $filename, $p->lineno
650-
if $p->orig_filename
651-
set $orig_filename = strrchr($p->orig_filename, '/')
652-
if !$orig_filename
653-
set $orig_filename = $p->orig_filename
654-
else
655-
set $orig_filename = $orig_filename + 1
656-
end
657-
printf " <= %s:%d\n", $orig_filename, $p->orig_lineno
658-
else
659-
printf "\n"
660-
end
661-
if $arg0 != 0
662-
set $p = 0
663-
set $not_found = 0
664-
else
665-
set $p = $p->pNext
666-
end
667-
else
668-
set $p = $p->pNext
669-
end
670-
end
671-
if $not_found
672-
printf "no such block that begins at %p.\n", $aptr
673-
end
674-
if $arg0 == 0
675-
printf "-------------------------------------------------------------------------------\n"
676-
printf " total: %d bytes\n", $total_size
677-
end
678-
end
679-
680-
document zmemcheck
681-
show status of a memory block.
682-
usage: zmemcheck [ptr].
683-
if ptr is 0, all blocks will be listed.
684-
end
685-
686613
define lookup_root
687614
set $found = 0
688615
if gc_globals->roots

0 commit comments

Comments
 (0)