[Lldb-commits] [PATCH] Skip symlinks to the original file when searching for debug info

Pavel Labath labath at google.com
Tue Feb 24 01:24:24 PST 2015


Update commit message


http://reviews.llvm.org/D7836

Files:
  source/Host/common/Symbols.cpp
  test/functionalities/unwind/noreturn/TestNoreturnUnwind.py

Index: source/Host/common/Symbols.cpp
===================================================================
--- source/Host/common/Symbols.cpp
+++ source/Host/common/Symbols.cpp
@@ -87,7 +87,7 @@
             const std::string &filename = files[idx_file];
             FileSpec file_spec (filename.c_str(), true);
 
-            if (file_spec == module_spec.GetFileSpec())
+            if (llvm::sys::fs::equivalent (file_spec.GetPath(), module_spec.GetFileSpec().GetPath()))
                 continue;
 
             if (file_spec.Exists())
Index: test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
===================================================================
--- test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
+++ test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
@@ -44,7 +44,9 @@
         thread = process.GetThreadAtIndex(0)
         abort_frame_number = 0
         for f in thread.frames:
-            if f.GetFunctionName() == "abort":
+            # We use endswith() to look for abort() since some C libraries mangle the symbol into
+            # __GI_abort or similar.
+            if f.GetFunctionName().endswith("abort"):
                 break
             abort_frame_number = abort_frame_number + 1

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7836.20572.patch
Type: text/x-patch
Size: 1251 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150224/673ae4f8/attachment.bin>


More information about the lldb-commits mailing list