I run my code as a standalone executable linked against the root libraries.
I would greatly appreciate if somebody could tell me how to stop root trapping a segmentation fault and preventing a core dump when I have a bug in my code. Currently root attempts to do a stack trace itself but this is usually useless and things would be easier if I could just work with the core file myself.
in your system.rootrc file or $HOME/.rootrc change the line
# Global debug mode. When >0 turns on progressively more details debugging.
Root.Debug: 0
Root.Stacktrace: yes
from yes to no.
Otherwise simply use gdb.
Now when I do gcc test.cc and then ./a.out I get the following
Segmentation fault (core dumped)
and I get a nice core file in my working directory. When I link the same code with the root libraries by
gcc test.cc -L/opt/ppd/scratch/harper/5.14.00f-CMS3q//lib -lCore -ldl
when I run ./a.out I get
*** Break *** segmentation violation
and no core file. Is there a setting for it to just dump a core file.