svn commit: r351610 - projects/clang900-import/contrib/libunwind/src

Dimitry Andric dim at FreeBSD.org
Thu Aug 29 18:53:01 UTC 2019


Author: dim
Date: Thu Aug 29 18:53:00 2019
New Revision: 351610
URL: https://svnweb.freebsd.org/changeset/base/351610

Log:
  Update libunwind custom frame register and deregister functions for
  FreeBSD: use the new doubly underscored names for unw_add_dynamic_fde
  and unw_remove_dynamic_fde.
  
  NOTE: this should be upstreamed...

Modified:
  projects/clang900-import/contrib/libunwind/src/UnwindLevel1-gcc-ext.c

Modified: projects/clang900-import/contrib/libunwind/src/UnwindLevel1-gcc-ext.c
==============================================================================
--- projects/clang900-import/contrib/libunwind/src/UnwindLevel1-gcc-ext.c	Thu Aug 29 18:23:38 2019	(r351609)
+++ projects/clang900-import/contrib/libunwind/src/UnwindLevel1-gcc-ext.c	Thu Aug 29 18:53:00 2019	(r351610)
@@ -227,7 +227,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetIPInfo(struct _
 
 #if defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND)
 
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__)
 
 // Based on LLVM's lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp
 // and XXX should be fixed to be alignment-safe.
@@ -242,9 +242,9 @@ static void processFDE(const char *addr, bool isDeregi
     uint32_t offset = *((const uint32_t *)p);
     if (offset != 0) {
       if (isDeregister)
-        _unw_remove_dynamic_fde((unw_word_t)(uintptr_t)addr);
+        __unw_remove_dynamic_fde((unw_word_t)(uintptr_t)addr);
       else
-        _unw_add_dynamic_fde((unw_word_t)(uintptr_t)addr);
+        __unw_add_dynamic_fde((unw_word_t)(uintptr_t)addr);
     }
     addr = p + length;
   }
@@ -265,9 +265,8 @@ _LIBUNWIND_EXPORT void __deregister_frame(const void *
   processFDE(addr, true);
 }
 
+#else // defined(__FreeBSD__)
 
-#else
-
 /// Called by programs with dynamic code generators that want
 /// to register a dynamically generated FDE.
 /// This function has existed on Mac OS X since 10.4, but
@@ -277,7 +276,6 @@ _LIBUNWIND_EXPORT void __register_frame(const void *fd
   __unw_add_dynamic_fde((unw_word_t)(uintptr_t)fde);
 }
 
-
 /// Called by programs with dynamic code generators that want
 /// to unregister a dynamically generated FDE.
 /// This function has existed on Mac OS X since 10.4, but
@@ -287,7 +285,7 @@ _LIBUNWIND_EXPORT void __deregister_frame(const void *
   __unw_remove_dynamic_fde((unw_word_t)(uintptr_t)fde);
 }
 
-#endif
+#endif // defined(__FreeBSD__)
 
 // The following register/deregister functions are gcc extensions.
 // They have existed on Mac OS X, but have never worked because Mac OS X


More information about the svn-src-projects mailing list