Debugging Haskell: the stack

Christoph Lueth cxl@Informatik.Uni-Bremen.DE
Fri, 25 Oct 2002 14:54:56 +0200

Dear Haskell people,

when I call from Haskell into C, stop it there, and use a debugger (e.g 
gdb) to look at the stack, it looks all broken. Here is an example:

#0  c_init () at c.c:5
#1  0x08048f14 in ssM_fast1 ()
#2  0x0804a248 in sakt_ret ()
#3  0x04c58308 in ?? ()

(c_init is a C function on which I've set a breakpoint). Now, I don't 
expect to see meaningful stack frames from Haskell, but I am calling 
into Haskell from C, and I would expect the C functions calling into 
Haskell to appear on the stack frame. What is happening? How does 
Haskell manage to still return to C when the stack looks like that?

Best regards,