When opening a coredump with gdb, will gdb try to load the full coredump into memory?
I’ve found a coredump with a size of 35Gb on one of our staging systems. Our operating instructions call for the creation of a backtrace using gdb. I’m afraid gdb will try to load the full coredump into memory and render the staging area unusable by using up all available memory.
We’re using gdb 7.0.1 on a RedHat EL 5 / 64bit installation.
No.
Even without loading the entire core dump, GDB will consume some memory, so you may have an effect on your staging system. If you can’t afford to have an effect, then you need to modify your “operating procedures”, e.g. move the core to a different system and analyze it there. Beware: if your executable uses dynamic linking, you must arrange for the dynamic libraries to match exactly at the time when core dump was generated and when it is analyzed.