projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0daf69b
)
fix :print when !tablesNextToCode
author
Simon Marlow
<simonmar@microsoft.com>
Thu, 18 Oct 2007 10:53:40 +0000
(10:53 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Thu, 18 Oct 2007 10:53:40 +0000
(10:53 +0000)
compiler/ghci/RtClosureInspect.hs
patch
|
blob
|
history
diff --git
a/compiler/ghci/RtClosureInspect.hs
b/compiler/ghci/RtClosureInspect.hs
index
10dbb16
..
4f9588f
100644
(file)
--- a/
compiler/ghci/RtClosureInspect.hs
+++ b/
compiler/ghci/RtClosureInspect.hs
@@
-179,7
+179,15
@@
getClosureData :: a -> IO Closure
getClosureData a =
case unpackClosure# a of
(# iptr, ptrs, nptrs #) -> do
getClosureData a =
case unpackClosure# a of
(# iptr, ptrs, nptrs #) -> do
+#ifndef GHCI_TABLES_NEXT_TO_CODE
+ -- 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)
+#else
itbl <- peek (Ptr iptr)
itbl <- peek (Ptr iptr)
+#endif
let tipe = readCType (BCI.tipe itbl)
elems = fromIntegral (BCI.ptrs itbl)
ptrsList = Array 0 (elems - 1) elems ptrs
let tipe = readCType (BCI.tipe itbl)
elems = fromIntegral (BCI.ptrs itbl)
ptrsList = Array 0 (elems - 1) elems ptrs