diff options
author | Luca Pizzamiglio <pizzamig@FreeBSD.org> | 2017-09-13 14:27:14 +0000 |
---|---|---|
committer | Luca Pizzamiglio <pizzamig@FreeBSD.org> | 2017-09-13 14:27:14 +0000 |
commit | f41c31d93a29c19e6ed28a66f5d32e6a459bb32b (patch) | |
tree | b17878d95dd6f3e2564952fbf32d7390d8fb5a98 /devel | |
parent | 576ce318b0cd69b5e389a973052ac89c75757e85 (diff) | |
download | ports-f41c31d93a29c19e6ed28a66f5d32e6a459bb32b.tar.gz ports-f41c31d93a29c19e6ed28a66f5d32e6a459bb32b.zip |
devel/gdb: Fix build on MIPS and powerpc
Fixing build on big-endian 64bit platforms, like MIPS and powerpc
Submitted by: jhb
Reviewed by: andreast
Approved by: olivier (mentor)
Differential Revision: https://reviews.freebsd.org/D12182
Notes
Notes:
svn path=/head/; revision=449795
Diffstat (limited to 'devel')
-rw-r--r-- | devel/gdb/Makefile | 3 | ||||
-rw-r--r-- | devel/gdb/files/commit-0335ac6d12 | 24 | ||||
-rw-r--r-- | devel/gdb/files/kgdb/ppcfbsd-kern.c | 2 |
3 files changed, 27 insertions, 2 deletions
diff --git a/devel/gdb/Makefile b/devel/gdb/Makefile index d5aedd386ef9..3074568c4a5b 100644 --- a/devel/gdb/Makefile +++ b/devel/gdb/Makefile @@ -48,7 +48,8 @@ EXTRA_PATCHES= ${FILESDIR}/commit-45eba0ab7d \ ${FILESDIR}/commit-4b654465bf \ ${FILESDIR}/commit-b30ff123fb \ ${FILESDIR}/commit-48aeef91c2 \ - ${FILESDIR}/commit-0aa37b654c + ${FILESDIR}/commit-0aa37b654c \ + ${FILESDIR}/commit-0335ac6d12 LIB_DEPENDS+= libexpat.so:textproc/expat2 VER= ${PORTVERSION:S/.//g} diff --git a/devel/gdb/files/commit-0335ac6d12 b/devel/gdb/files/commit-0335ac6d12 new file mode 100644 index 000000000000..b34450bc1c3c --- /dev/null +++ b/devel/gdb/files/commit-0335ac6d12 @@ -0,0 +1,24 @@ +commit 0335ac6d12906bfb4b48410d8a7229c21c727cf2 +Author: John Baldwin <jhb@FreeBSD.org> +Date: Tue Aug 15 08:04:23 2017 -0700 + + Fix compile on big-endian platforms in siginfo_t converter. + + gdb/ChangeLog: + + * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian + platforms. + +diff --git gdb/fbsd-nat.c gdb/fbsd-nat.c +index c89343a24f..6ba6a01a70 100644 +--- gdb/fbsd-nat.c ++++ gdb/fbsd-nat.c +@@ -314,7 +314,7 @@ fbsd_convert_siginfo (siginfo_t *si) + 32-bits of the pointer value. */ + #if _BYTE_ORDER == _BIG_ENDIAN + if (si->si_value.sival_int == 0) +- si32->si_value.sival_ptr = (uintptr_t) si->si_value.sival_ptr; ++ si32.si_value.sival_ptr = (uintptr_t) si->si_value.sival_ptr; + else + si32.si_value.sival_int = si->si_value.sival_int; + #else diff --git a/devel/gdb/files/kgdb/ppcfbsd-kern.c b/devel/gdb/files/kgdb/ppcfbsd-kern.c index b562e87d1e4e..f9328c68c63f 100644 --- a/devel/gdb/files/kgdb/ppcfbsd-kern.c +++ b/devel/gdb/files/kgdb/ppcfbsd-kern.c @@ -58,7 +58,7 @@ ppcfbsd_supply_pcb(struct regcache *regcache, CORE_ADDR pcb_addr) tdep = gdbarch_tdep (target_gdbarch()); - if (target_read_memory(pcb_addr, &pcb, sizeof(pcb)) != 0) + if (target_read_memory(pcb_addr, (gdb_byte *)&pcb, sizeof(pcb)) != 0) memset(&pcb, 0, sizeof(pcb)); /* |