[Lldb-commits] [PATCH] D22917: Add/fix support for i386 elf core files

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 28 08:58:15 PDT 2016

labath added a comment.

Looks great, thanks.

Please just fix the null pointer issue and we are good to go.

Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:1506
@@ -1502,2 +1505,3 @@
                     llvm::StringRef path(data.GetCStr(&offset));
+                    if (path.startswith("/lib/x86_64-linux-gnu") || path.startswith("/lib/i386-linux-gnu"))
Originally, this was crashing the debugger because GetCStr returned a null pointer. That can still happen in case of a corrupt core file. While we're touching this code, we should fix that as well.


More information about the lldb-commits mailing list