Module Name: src Committed By: joerg Date: Wed Apr 2 22:22:37 UTC 2014
Modified Files: src/sys/lib/libunwind: AddressSpace.hpp Log Message: SH3 uses unaligned data in the .eh_frame section, so use memcpy. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/lib/libunwind/AddressSpace.hpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/lib/libunwind/AddressSpace.hpp diff -u src/sys/lib/libunwind/AddressSpace.hpp:1.3 src/sys/lib/libunwind/AddressSpace.hpp:1.4 --- src/sys/lib/libunwind/AddressSpace.hpp:1.3 Wed Mar 12 22:50:59 2014 +++ src/sys/lib/libunwind/AddressSpace.hpp Wed Apr 2 22:22:37 2014 @@ -69,13 +69,29 @@ public: pthread_rwlock_init(&fdeTreeLock, NULL); } - uint8_t get8(pint_t addr) { return *((uint8_t *)addr); } + uint8_t get8(pint_t addr) { + uint8_t val; + memcpy(&val, (void *)addr, sizeof(val)); + return val; + } - uint16_t get16(pint_t addr) { return *((uint16_t *)addr); } + uint16_t get16(pint_t addr) { + uint16_t val; + memcpy(&val, (void *)addr, sizeof(val)); + return val; + } - uint32_t get32(pint_t addr) { return *((uint32_t *)addr); } + uint32_t get32(pint_t addr) { + uint32_t val; + memcpy(&val, (void *)addr, sizeof(val)); + return val; + } - uint64_t get64(pint_t addr) { return *((uint64_t *)addr); } + uint64_t get64(pint_t addr) { + uint64_t val; + memcpy(&val, (void *)addr, sizeof(val)); + return val; + } uintptr_t getP(pint_t addr) { if (sizeof(uintptr_t) == sizeof(uint32_t))