[llvm-dev] -msave-args backend support for x86_64 (original) (raw)

Joerg Sonnenberger via llvm-dev llvm-dev at lists.llvm.org
Thu Apr 27 09:04:48 PDT 2017


On Thu, Apr 27, 2017 at 10:53:18PM +1000, David Gwynne via llvm-dev wrote:

that assumes that shipping dwarf is reasonable and handling dwarf is simple. in my situation im trying to make an in kernel debugger more useful. the debugger is the thing that happens when the kernel crashes. adding dwarf to the kernel increases its size by more than a factor of 4 (44.7M vs 10.6M), and adding code for dwarf handling would increase that size further.

This doesn't need full debug data, just .eh_frame when emitting the proper markers. From a debugger perspective it means unwinding into the caller's frame and asking for the value of the registers at the call site. The advantage is that code generation can pick different options based on the individual requirements, i.e. it no longer has to be a strict binary choice but can accomodate different use cases ("I will use a debugger, so skip redundant instructions if it is still in a register").

Joerg



More information about the llvm-dev mailing list