summaryrefslogtreecommitdiff
path: root/peek
diff options
context:
space:
mode:
Diffstat (limited to 'peek')
-rwxr-xr-xpeek31
1 files changed, 0 insertions, 31 deletions
diff --git a/peek b/peek
deleted file mode 100755
index 057c897e6e..0000000000
--- a/peek
+++ /dev/null
@@ -1,31 +0,0 @@
-#!./perl
-
-sub peekstr {
- local ($addr, $len) = @_;
- local ($mem) = unpack("P$len", pack("L",$addr+0));
- $mem;
-}
-
-sub unpackmem {
- local ($addr, $len, $template) = @_;
- local $mem = peekstr($addr, $len);
- unpack($template, $mem);
-}
-
-$foo = "stuff";
-
-($any, $refcnt, $type, $flags, $storage, $private) =
- unpackmem(\$foo, 12, "L2 C4");
-
-printf "SV = any %lx refcnt %d type %d flags %x storage '%c' private %x\n",
- $any, $refcnt, $type, $flags, $storage, $private;
-
-if ($type >= 4) {
- ($pv, $cur, $len) = unpackmem($any, 12, "L3");
-
- printf "XPV = pv %lx cur %d len %d\n", $pv,$cur,$len;
-
- $string = peekstr($pv, $cur);
-
- print "String = $string\n"
-}