[Lldb-commits] [PATCH] D45628: [LLDB] Support compressed debug info sections (.zdebug*)

Davide Italiano via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 18 09:45:07 PDT 2018


davide requested changes to this revision.
davide added a comment.
This revision now requires changes to proceed.

Some minor comments, almost ready to go. Do you have commit access or you need somebody to push this on your behalf?



================
Comment at: packages/Python/lldbsuite/test/linux/compressed-debug-info/TestCompressedDebugInfo.py:22-40
+        exe = self.getBuildArtifact("compressed.out")
+
+        self.target = self.dbg.CreateTarget(exe)
+        self.assertTrue(self.target, VALID_TARGET)
+
+        main_bp = self.target.BreakpointCreateByName("main", "compressed.out")
+        self.assertTrue(main_bp, VALID_BREAKPOINT)
----------------
This test is too much boilerplate. We moved to a new, more concise style. You might consider using
```
        (target, process, thread, main_breakpoint) = lldbutil.run_to_source_breakpoint(self, 
                "break here", src_file_spec, exe_name = exe)
```

instead.


================
Comment at: packages/Python/lldbsuite/test/linux/compressed-debug-info/TestCompressedDebugInfo.py:47-64
+        self.build()
+        exe = self.getBuildArtifact("compressed.gnu.out")
+
+        self.target = self.dbg.CreateTarget(exe)
+        self.assertTrue(self.target, VALID_TARGET)
+
+        main_bp = self.target.BreakpointCreateByName("main", "compressed.gnu.out")
----------------
ditto.


================
Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:1778-1781
+  llvm::StringRef mapped_name;
+  if (section_name.startswith(".zdebug")) {
+    mapped_name = section_name.drop_front(2);
+  } else {
----------------
Can you add a comment to explain why are you dropping the first two character here? 



https://reviews.llvm.org/D45628





More information about the lldb-commits mailing list