[PATCH] D73822: hwasan_symbolize: warn about missing symbols at most once per library

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 3 18:31:41 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0dc634babf9e: hwasan_symbolize: warn about missing symbols at most once per library (authored by eugenis).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73822/new/

https://reviews.llvm.org/D73822

Files:
  compiler-rt/lib/hwasan/scripts/hwasan_symbolize


Index: compiler-rt/lib/hwasan/scripts/hwasan_symbolize
===================================================================
--- compiler-rt/lib/hwasan/scripts/hwasan_symbolize
+++ compiler-rt/lib/hwasan/scripts/hwasan_symbolize
@@ -28,6 +28,7 @@
     self.__binary_prefixes = binary_prefixes
     self.__paths_to_cut = paths_to_cut
     self.__log = False
+    self.__warnings = set()
 
   def enable_logging(self, enable):
     self.__log = enable
@@ -73,7 +74,9 @@
       full_path = os.path.join(p, os.path.basename(name))
       if os.path.exists(full_path):
         return full_path
-    print >>sys.stderr, "Could not find symbols for", name
+    if name not in self.__warnings:
+      print >>sys.stderr, "Could not find symbols for", name
+      self.__warnings.add(name)
     return None
 
   def iter_locals(self, binary, addr):


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73822.242240.patch
Type: text/x-patch
Size: 839 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200204/56033935/attachment.bin>


More information about the llvm-commits mailing list