================
Comment at: test/functionalities/unwind/noreturn/TestNoreturnUnwind.py:47-49
@@ -46,3 +46,5 @@
         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
----------------
:(  Really dislike seeing assumptions about mangling schemes hardcoded into 
string comparisons.  Although admittedly, I don't think this is worse than 
before, and even worse, there's no good alternative.  Mostly just a drive by 
comment.  That said, this will detect any function that ends with abort.  

We don't have a perfect solution at this point, but checking against an 
explicit list of known manglings would generate fewer false positives.  For 
example, the algorithm here would catch a function called 
"completely_unrelated_abort".  The comment says some C libraries mangle into 
__GI_abort "or similar".  Is the list of similar manglings long?

http://reviews.llvm.org/D7836

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to