small improvements to tools/gdb-macros
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16157 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
d953f6e079
commit
dc555cf572
|
@ -156,7 +156,7 @@ define camlint
|
||||||
end
|
end
|
||||||
|
|
||||||
define camlblock
|
define camlblock
|
||||||
printf "%#lx: ", $arg0
|
printf "%#lx: ", $arg0 - $camlwordsize
|
||||||
camlheap $arg0
|
camlheap $arg0
|
||||||
printf " "
|
printf " "
|
||||||
camlheader $arg0
|
camlheader $arg0
|
||||||
|
@ -185,6 +185,7 @@ define camlblock
|
||||||
end
|
end
|
||||||
|
|
||||||
if $tag == 249
|
if $tag == 249
|
||||||
|
printf "... infix header, displaying enclosing block:\n"
|
||||||
set $mybaseaddr = $arg0 - $camlwordsize * $mysize
|
set $mybaseaddr = $arg0 - $camlwordsize * $mysize
|
||||||
camlblock $mybaseaddr
|
camlblock $mybaseaddr
|
||||||
# reset $tag, which was clobbered by the recursive call (yuck)
|
# reset $tag, which was clobbered by the recursive call (yuck)
|
||||||
|
@ -215,6 +216,8 @@ define camlblock
|
||||||
printf "... truncated ...\n"
|
printf "... truncated ...\n"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
printf "next block head: %#lx value: %#lx\n", \
|
||||||
|
$arg0 + $camlwordsize * $mysize, $arg0 + $camlwordsize * ($mysize+1)
|
||||||
end
|
end
|
||||||
|
|
||||||
# displays an OCaml value
|
# displays an OCaml value
|
||||||
|
@ -251,8 +254,8 @@ define camlchunks
|
||||||
while $chunk != 0
|
while $chunk != 0
|
||||||
set $chunk_size = * (unsigned long *) ($chunk - 2 * $camlwordsize)
|
set $chunk_size = * (unsigned long *) ($chunk - 2 * $camlwordsize)
|
||||||
set $chunk_alloc = * (unsigned long *) ($chunk - 3 * $camlwordsize)
|
set $chunk_alloc = * (unsigned long *) ($chunk - 3 * $camlwordsize)
|
||||||
printf "chunk: addr = %#x .. %#x", $chunk, $chunk + $chunk_size
|
printf "chunk: addr = %#lx .. %#lx", $chunk, $chunk + $chunk_size
|
||||||
printf " (size = %#x; alloc = %#x)\n", $chunk_size, $chunk_alloc
|
printf " (size = %#lx; alloc = %#lx)\n", $chunk_size, $chunk_alloc
|
||||||
set $chunk = * (unsigned long *) ($chunk - $camlwordsize)
|
set $chunk = * (unsigned long *) ($chunk - $camlwordsize)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue