[Lldb-commits] [PATCH] D146679: [lldb] Add support for the DW_AT_trampoline attribute with mangled names

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 22 18:47:29 PDT 2023


bulbazord added inline comments.


================
Comment at: lldb/include/lldb/Symbol/Function.h:439
   ///     The section offset based address for this function.
+  /// \param[in] range
+  ///     The symbol name this function should trampoline to.
----------------



================
Comment at: lldb/source/Core/Module.cpp:782
+          sc.function) {
+        is_trampoline = !sc.function->IsTrampoline();
+      }
----------------
The logic here is a little confusing. If the function is not a trampoline, then `is_trampoline` is true? Below, `keep_it` can only be true if we're not looking at a trampoline. So if a function is not a trampoline, we cannot keep it. Am I understanding the logic here incorrectly?


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2450
                                    func_user_id, func_name, func_type,
-                                   func_range); // first address range
+                                   func_range, trampoline_target); // first address range
 
----------------
nit: this comment could be updated to indicate that it's referring to `func_range`.


================
Comment at: lldb/source/Target/TargetProperties.td:187
+    Global, DefaultTrue,
+    Desc<"Enable trampoline support in LLDB. Trampoline support includes stepping through trampoline directly to their targets, stepping out of trampolines directly to their callers, automatically filtering out trampolines as possible breakpoints locations when set by name, etc.">;
 }
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146679/new/

https://reviews.llvm.org/D146679



More information about the lldb-commits mailing list