For those interested:
Solved by modifying `target.mak` to add DEBUG=y (and GDB=y if you are interested in working with the core file afterwards) under the respective device section.
After system boots up:
echo /tmp/core > /proc/sys/kernel/core_pattern
echo 1 > /proc/sys/kernel/core_uses_pid
echo 2 > /proc/sys/fs/suid_dumpable
Will figure out how to make it persistent over reboots.
I've added this to the `/jfffs/scripts/init-start`. What gives me trouble is `ulimit -c unlimited` as it seems to be shell specific. Is there a way to set this system-wide?
Well tell me if I test it wrong, but ssh-ing into the box, setting `ulimit -c unlimited`, disconnecting, and reconnecting again has ulimit -c back to 0. Forks do inherit parent's setting, though.
Right. I've found a solution in cases where one can insert a piece of code into the source: use setrlimit(). It also needs to be run with elevated privileges.
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!