Commit 30ad291a authored by Simon Marlow's avatar Simon Marlow
Browse files

fix :print when !tablesNextToCode

parent 0daf69ba
......@@ -179,7 +179,15 @@ getClosureData :: a -> IO Closure
getClosureData a =
case unpackClosure# a of
(# iptr, ptrs, nptrs #) -> do
-- the info pointer we get back from unpackClosure# is to the
-- beginning of the standard info table, but the Storable instance
-- for info tables takes into account the extra entry pointer
-- when !tablesNextToCode, so we must adjust here:
itbl <- peek (Ptr iptr `plusPtr` negate wORD_SIZE)
itbl <- peek (Ptr iptr)
let tipe = readCType (BCI.tipe itbl)
elems = fromIntegral (BCI.ptrs itbl)
ptrsList = Array 0 (elems - 1) elems ptrs
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment