Unable to pull up a stack trace in gdb from a core dump


I built my program with ‘-g’, did an ‘export OCAMLRUNPARAM=b’ before running it and then triggered a core dump. However, I don’t see any useful stack trace in gdb.

(gdb) where
#0  0x00000000004026b3 in ?? ()
#1  0x0000000000632870 in ?? ()
#2  0x00000000004022b9 in ?? ()
#3  0x0000000000000628 in ?? ()
#4  0x000000000041f8c8 in ?? ()
#5  0x0000000000000000 in ?? ()

Any ideas what might be going on? I also see:
“warning: core file may not match specified executable file.”


It seems to me one possible explanation is that your core file doesn’t match the executable. I have never seen this warning, and so it’s a little suspicious.

I’m doing all this locally and i’ve tried it multiple times. i don’t think that’s the reason. But, yes, I agree, that it could be the cause of not being able to load the stack trace. I don’t know enough about gdb to know how this would be possible