How do I find out which info table a continuation belongs to?

Ömer Sinan Ağacan omeragacan at gmail.com
Mon Sep 2 11:01:15 UTC 2019


Fixed in https://gitlab.haskell.org/ghc/ghc/merge_requests/1654

Ömer

Ömer Sinan Ağacan <omeragacan at gmail.com>, 10 Şub 2019 Paz, 10:49
tarihinde şunu yazdı:
>
> I'm currently working on a bug and one of the things I often want to know is
> what's on the stack. The problem is I can't see labels of continuations so the
> information is really useless. Example:
>
>     >>> call printStack(((StgTSO*)0x42000e0198)->stackobj)
>     0x42000c8788: RET_SMALL (0x512d70)
>     0x42000c8790: RET_SMALL (0x40edf0)
>        stk[5] (0x42000c8798) = 0x7b3938
>     0x42000c87a0: CATCH_FRAME(0x735a98,0x7d3ff2)
>     0x42000c87b8: STOP_FRAME(0x7311b8)
>
> (I modified the printer to print stack locations when printing stacks)
>
> Here I need to know which info table the RET_SMALLs return to. Normally I do
> this for other kinds of closures:
>
>     >>> print ((StgClosure*)...)->header.info
>     $15 = (const StgInfoTable *) 0x404dc0 <Main_nats_info>
>
> But for continuations that doesn't work:
>
>     >>> print ((StgClosure*)0x42000c8788)->header.info
>     $11 = (const StgInfoTable *) 0x512d80
>     >>> info symbol 0x512d80
>     No symbol matches 0x512d80.
>
> Anyone know how to make this work? Can I maybe mark the continuations label in
> the generated assembly somehow to make those labels available in gdb?
>
> Thanks
>
> Ömer


More information about the ghc-devs mailing list