[fpc-pascal] How to analyze a core dump?
John Coppens
john at jcoppens.com
Sun Jun 10 23:01:26 CEST 2007
On Sun, 10 Jun 2007 21:30:09 +0200
Luca Olivetti <luca at ventoso.org> wrote:
> I'm trying to debug a segment violation, I compiled the program with
> -g, but analyzing the core dump isn't really helpful, maybe the
> "warning can't read pathname for load map" is the cause? Or it's
> possible that it's caused by some of the c libraries used having no
> debug symbols? Any hint?
I'm not too experienced in this, but I suspect a good first step would be
to ask for a backtrace (bt) in gdb, after the segfault occured. You'll
see the steps that led to the actual segfault, starting from the main
program till the library function that failed. Don't immediately suspect
the library - go back to the last line of your program and check if all
things are normal at _that_ point.
AFAIK, core dumps are not really related with gdb, but are generated by
the kernel, and should be the last step to fall back on. A backtrace in
gdb is generally more helpful.
John
More information about the fpc-pascal
mailing list