How to limit the size of core dump file when generating it using GDB

后端 未结 3 1840
醉话见心
醉话见心 2021-01-18 00:29

I am running an embedded application on ARM9 board, where total flash size is 180MB only. I am able to run gdb, but when I do

(gdb) generate-core-

3条回答
  •  一生所求
    2021-01-18 00:53

    in your shell rc-file:

    limit coredumpsize 50000             # or whatever limit size you like
    

    that should set the limit for everything, including GDB

    Note:

    If you set it to 0 , you can make sure your home directory is not cluttered with core dump files.

提交回复
热议问题