I'm working on a project that uses a lot of templates and libraries like boost:: fusion and found myself struggling with an executable that, as of today, is 600MB and gdb needs 1.7 GB of memory to just load it, and a symbol lookup would make it use nearly 3GBs.. The stripped binary is about 5 MBs.
The question is, is there anything to be done in order to generate smaller debug symbols? This is not only a problem with gdb but also with the linker, which uses another 1.2 GB of RAM when linking objects compiled with the -g flag
I've tried -g1 -g2 and -g3 and the problem remains the same.