I'm writing code in a C-like language, and am using an inline
function which does actually tend to get inlined. However, the inlining maintains the location in that function's source, in terms of the debugging info added by the compiler (e.g. DWARF added by GCC).
Is it possible to get the compiler to inline the function's code while attributing the instructions to the line at which the function was inlined?
For the sake of discussion, let's assume I'm writing C++ and compiling with GCC on Linux (although a more general answer is appreciated.)
(The motivation has to do with profiling where you only sample the function you're in but don't sample the entire stack.)