[PATCH] D36484: Add NetBSD support in asan_symbolize.py

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 8 13:19:50 PDT 2017

krytarowski created this revision.
krytarowski added a project: Sanitizers.
Herald added a subscriber: kubamracek.

Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

Sponsored by <The NetBSD Foundation>




Index: lib/asan/scripts/asan_symbolize.py
--- lib/asan/scripts/asan_symbolize.py
+++ lib/asan/scripts/asan_symbolize.py
@@ -280,7 +280,7 @@
 def SystemSymbolizerFactory(system, addr, binary, arch):
   if system == 'Darwin':
     return DarwinSymbolizer(addr, binary, arch)
-  elif system == 'Linux' or system == 'FreeBSD':
+  elif system == 'Linux' or system == 'FreeBSD' or system == 'NetBSD':
     return Addr2LineSymbolizer(binary)
@@ -370,7 +370,7 @@
       self.binary_name_filter = binary_name_filter
       self.dsym_hint_producer = dsym_hint_producer
       self.system = os.uname()[0]
-      if self.system not in ['Linux', 'Darwin', 'FreeBSD']:
+      if self.system not in ['Linux', 'Darwin', 'FreeBSD', 'NetBSD']:
         raise Exception('Unknown system')
       self.llvm_symbolizers = {}
       self.last_llvm_symbolizer = None

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36484.110270.patch
Type: text/x-patch
Size: 915 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170808/b5c53311/attachment.bin>

More information about the llvm-commits mailing list