core file

codephantom me at noyb.com
Mon Nov 13 09:49:29 UTC 2017


On Monday, 13 November 2017 at 06:25:20 UTC, Tony wrote:
> I am on Ubuntu 16.04. Thanks, I didn't know that "producing a 
> core file" was configurable, and it appears that it isn't.

ok. that's because Ubuntu is not (by default) setup for 
developers.

But you can enable core dump for your executable easily enough.

e.g, if you out file is a.out, then do this:

ulimit -S -c unlimited a.out
(now run your program, and you'll get core file in the same dir 
where the program is)
(this won't be remembered after a reboot, so just do it when/as 
required).

You can view the core file using > objdump -s core

Good luck understanding the contents of that ;-)

Core dumps typically require some specialised expertise to 
analyse.

Unless you're one of those specialists, then better to just run 
your a.out through the debugger, and forget about the core dump 
(until you can't)  ;-)



More information about the Digitalmars-d-learn mailing list