Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111626509
D8869.id23140.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8869.id23140.diff
View Options
Index: contrib/llvm/projects/libunwind/src/UnwindLevel1-gcc-ext.c
===================================================================
--- contrib/llvm/projects/libunwind/src/UnwindLevel1-gcc-ext.c
+++ contrib/llvm/projects/libunwind/src/UnwindLevel1-gcc-ext.c
@@ -224,6 +224,44 @@
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
+#ifdef __FreeBSD__
+
+static void processFDE(const char *addr, bool isDeregister) {
+ uint64_t length;
+ while ((length = *((const uint32_t *)addr)) != 0) {
+ const char *p = addr + 4;
+ if (length = 0xffffffff) {
+ length = *((const uint64_t *)p);
+ p += 8;
+ }
+ uint32_t offset = *((const uint32_t *)p);
+ if (offset != 0) {
+ if (isDeregister)
+ _unw_remove_dynamic_fde((unw_word_t)(uintptr_t)addr)
+ else
+ _unw_add_dynamic_fde((unw_word_t)(uintptr_t)addr);
+ }
+ addr = p + length;
+ }
+}
+
+/// Called by programs with dynamic code generators that want
+/// to register dynamically generated FDEs.
+_LIBUNWIND_EXPORT void __register_frame(const void *addr) {
+ _LIBUNWIND_TRACE_API("__register_frame(%p)", fde);
+ processFDE(addr, false);
+}
+
+/// Called by programs with dynamic code generators that want
+/// to unregister dynamically generated FDEs.
+_LIBUNWIND_EXPORT void __deregister_frame(const void *fde) {
+ _LIBUNWIND_TRACE_API("__deregister_frame(%p)", fde);
+ processFDE(addr, true);
+}
+
+
+#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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 7, 5:05 AM (16 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17025554
Default Alt Text
D8869.id23140.diff (1 KB)
Attached To
Mode
D8869: libunwind: make __{de,}register_frame compatible with libgcc API
Attached
Detach File
Event Timeline
Log In to Comment