[lldb-dev] Hiding trampoline functions from the backtrace, is it possible ?
Nat! via lldb-dev
lldb-dev at lists.llvm.org
Tue Sep 24 11:36:12 PDT 2019
On 24.09.19 19:28, Jim Ingham wrote:
> We've had many requests to elide some classes of entries in backtraces - like to mirror the Xcode display I mentioned previously. Most of these requests don't depend on the functions being marked artificial. So if we're going to do this, something more general than just "marked artificial" -> elided anyway.
Having done a little further research... Artificial won't work for
general cases anyway, since it's restricted to inline code (for some
reason) on gcc and clang. I wonder why, since for a function the only
real effect is to emit DW_AT_artificial (AFAIK). The restriction seems
arbitrary and DWARF wouldn't mind.. But the compilers do, so it seems
DW_AT_trampoline isn't supported by llvm. As I read the description of
DW_AT_trampoline, its more like a hardcoded vector (a->b), so not useful
for cases like objc_msgSend, where you don't know the destination a priori.
If I look at the DWARF spec, I don't see any other way to mark a
function as "boring". I still think this would be a good thing, as this
would be useful for other debuggers as well, which could instantly work.
Also a lot of code in the lldb Trampoline classes, for step-in and
step-out could probably just be removed.
More information about the lldb-dev