Add -g<level>
We should add debug info levels, just like GCC and LLVM has. In particular, I'd like to have -g1 which has (from https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html)
minimal information, enough for making backtraces in parts of the program that you don't plan to debug. This includes descriptions of functions and external variables, and line number tables, but no information about local variables.
This should let us have -g1 turned on even in production code, as it should grow binary sizes by much. This in turn should be a boon for debugability of programs. It should also allow us to offer some for of stack traces without any runtime cost (except when an exception with a stack trace is actually raised.)
Trac metadata
Trac field | Value |
---|---|
Version | 7.8.4 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | Tarrasch, scpmw |
Operating system | |
Architecture |