[Lldb-commits] [PATCH] D50478: Add support for artificial tail call frames

Stefan Gränitz via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 24 05:36:35 PDT 2018


sgraenitz added a comment.

Interesting topic and very well-written patch. Semantics look reasonable, but can't say much about the details. Added a few minor notes inline.



================
Comment at: lldb/include/lldb/Symbol/Function.h:456
+  //------------------------------------------------------------------
+  /// Get the outgoing tail-callling edges from this function. If none exist,
+  /// return None.
----------------
Typo: tail-calling


================
Comment at: lldb/packages/Python/lldbsuite/test/decorators.py:691
+def skipUnlessHasCallSiteInfo(func):
+    "Decorate the function to skip testing unless call site info from clang is available."""
+
----------------
Two leading `""` missing?


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:3757
+  // For now, assume that all entries are nested directly under the subprogram
+  // (this is the kind of DWARF LLVM produces) and parse them eagerly.
+  std::vector<CallEdge> call_edges;
----------------
Does any of the tests fail in case LLVM DWARFs change? Or is it very unlikely?


================
Comment at: lldb/source/Symbol/Function.cpp:149
+
+  lazy_callee.def = [&]() -> Function * {
+    ConstString callee_name{lazy_callee.mangled_name};
----------------
Easy to confuse with lambda assignment (although it wouldn't make any sense).
```
auto resolve = [&]() -> Function * {
   ...
};
lazy_callee.def = resolve();
resolved = true;
```
Maybe?


https://reviews.llvm.org/D50478





More information about the lldb-commits mailing list