... | ... | @@ -261,7 +261,7 @@ closure for the `Int` value 5. Closures always consist of an info |
|
|
pointer (`GHCziBase_Izh_con_info` in this case, the `I#`
|
|
|
constructor), followed by any number of payload words (just one word
|
|
|
containing the value 5, here). Full details on closure layouts are in
|
|
|
[includes/rts/storage/Closures.h](https://gitlab.haskell.org/ghc/ghc/blob/master/includes/rts/storage/Closures.h).
|
|
|
[includes/rts/storage/Closures.h](https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/storage/Closures.h).
|
|
|
|
|
|
|
|
|
It looks like the next word contains garbage, probably because it is
|
... | ... | @@ -286,7 +286,7 @@ execution. The *info pointer* of a closure actually points to the |
|
|
entry code (this is a trick used by GHC so that the common operation
|
|
|
of jumping to the entry code for a closure can be done with a single
|
|
|
indirection). The layout of info tables is defined in
|
|
|
[includes/rts/storage/InfoTables.h](https://gitlab.haskell.org/ghc/ghc/blob/master/includes/rts/storage/InfoTables.h).
|
|
|
[includes/rts/storage/InfoTables.h](https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/storage/InfoTables.h).
|
|
|
|
|
|
|
|
|
To display the stack, you need to know what the `Sp` register is
|
... | ... | @@ -336,7 +336,7 @@ $5 = {srt_offset = 4241688, __pad_srt_offset = 6684481, i = {layout = { |
|
|
|
|
|
The `type` field tells us what kind of object this is, in this
|
|
|
case `36`}, which means a `RET_SMALL` stack frame (see
|
|
|
[includes/rts/storage/ClosureTypes.h](https://gitlab.haskell.org/ghc/ghc/blob/master/includes/rts/storage/ClosureTypes.h)
|
|
|
[includes/rts/storage/ClosureTypes.h](https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/storage/ClosureTypes.h)
|
|
|
for a list of closure types, but make sure you are
|
|
|
looking at the right version of this file for the build you're using,
|
|
|
because the types do change).
|
... | ... | |