[cfe-dev] [PATCH 1/3] Fixes type of dyldInfo for glibc/bionic systems

Dan Albert danalbert at google.com
Wed Apr 16 09:33:24 PDT 2014


Darwin and the BSDs define a tagged struct dl_info typedef'd as Dl_info. glibc
and bionic typedef an anonymous struct as Dl_info.
---
 src/Unwind/AddressSpace.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Unwind/AddressSpace.hpp b/src/Unwind/AddressSpace.hpp
index dd58f24..ceab016 100644
--- a/src/Unwind/AddressSpace.hpp
+++ b/src/Unwind/AddressSpace.hpp
@@ -324,7 +324,7 @@ inline bool LocalAddressSpace::findOtherFDE(pint_t targetAddr, pint_t &fde) {
 inline bool LocalAddressSpace::findFunctionName(pint_t addr, char *buf,
                                                 size_t bufLen,
                                                 unw_word_t *offset) {
-  dl_info dyldInfo;
+  Dl_info dyldInfo;
   if (dladdr((void *)addr, &dyldInfo)) {
     if (dyldInfo.dli_sname != NULL) {
       strlcpy(buf, dyldInfo.dli_sname, bufLen);
-- 
1.9.1.423.g4596e3a




More information about the cfe-dev mailing list