[Lldb-commits] [PATCH] D22294: Add functionality for rewriting symbols

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 13 03:11:29 PDT 2016


labath added a subscriber: labath.
labath added a comment.

Mostly just comments about the test from me.


================
Comment at: include/lldb/Core/Module.h:240
@@ -239,2 +239,3 @@
     FindFirstSymbolWithNameAndType (const ConstString &name, 
+                                    const lldb::SymbolRewriterSP rewriter,
                                     lldb::SymbolType symbol_type = lldb::eSymbolTypeAny);
----------------
The const, as specified here is useless. `const SP &` avoids a copy, `shared_ptr<const SymbolRewriter>` ensures the rewriter cannot be modified. You probably want one of those.

================
Comment at: packages/Python/lldbsuite/test/lang/c/symbol_rewriter/TestSymbolRewriter.py:20
@@ +19,3 @@
+    @expectedFailureAll(compiler="clang", compiler_version=["<", "3.7"])
+    @expectedFailureAll(compiler='gcc')
+    @skipIfWindows
----------------
If these compilers don't even support the features, go with skip instead of xfail.

================
Comment at: packages/Python/lldbsuite/test/lang/c/symbol_rewriter/TestSymbolRewriter.py:28
@@ +27,3 @@
+        # Clang does not rewrite dwarf debug info, so it must be stripped
+        subprocess.check_call(['strip', '-g', exe])
+
----------------
This is not going to work for remote targets on different architectures. If you don't need debug info, could you just avoid generating it in the first place (-g0 ?). Maybe then you would be able to get this working on windows as well.
If it doesn't work, then we should wire up this call to go through the Makefile, as it already knows how to find the right toolchain for cross-compilation.


http://reviews.llvm.org/D22294





More information about the lldb-commits mailing list