How to debug a segfault.

David Brown haskell2 at
Tue Feb 27 20:05:57 EST 2007

I'm developing a program with GHC-6.6.  I've been on amd64, and
haven't had problems, but now when I run the program on on x86 (after
cleaning and recompiling), I'm getting a segfault.

gdb isn't very helpful at all:
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread -1212873040 (LWP 26946)]
    0x080b45b8 in s2EI_info ()
    (gdb) bt
    #0  0x080b45b8 in s2EI_info ()
    #1  0x081757a8 in ?? ()
    #2  0x00000004 in ?? ()
    #3  0xb7875278 in ?? ()

I am using some various bindings to some C libraries, some I have
written and some written by others.  But, I'm not able to figure out
where to even begin looking for the problem.

Any advice on how I might be able to better debug this?  Would
compiling unregistered help (I'll have to figure out how to build
libraries for that)?

David Brown

More information about the Glasgow-haskell-users mailing list