[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Forcing a core dump?



Neil Booth (NeilB@earthling.net) wrote:

> I have found a bug in some software that causes it to segfault.
> However, there is no core file to use with gdb.  Why is a core file
> not generated / how do I force one?

Programs can prevent themselves from dumping core -- if they do, then
there's nothing you can do to force them.

It's better to run the application *inside* gdb -- then if it segfaults,
you can do "bt" or "where" to get a stack trace, and mail it off to
whoever wants to see it (the program's maintainer, etc.).

$ gdb foo
...
(gdb) run arg1 arg2 ...
... seg fault ...
(gdb) bt

-- 
Greg Wooledge                    | Distributed.NET http://www.distributed.net/
wooledge@kellnet.com             | because a CPU is a terrible thing to waste.
http://www.kellnet.com/wooledge/ |

Attachment: pgpsGkK3woWkX.pgp
Description: PGP signature


Reply to: