From: Doug Evans Date: Fri, 31 May 2013 19:14:33 +0000 (+0000) Subject: * linux-x86-low.c (ps_get_thread_area): Properly extend address to X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d1ec4ce7c989d92f6e1b171b741c67dd2212e7ed;p=binutils-gdb.git * linux-x86-low.c (ps_get_thread_area): Properly extend address to 64 bits in 64-cross-32 environment. --- diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index bbdac13fc6e..fb0eed6eb72 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2013-05-31 Doug Evans + + * linux-x86-low.c (ps_get_thread_area): Properly extend address to + 64 bits in 64-cross-32 environment. + 2013-05-28 Pedro Alves * Makefile.in (clean): Remove reference to aarch64-without-fpu.c. diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c index 1d1df957137..dfe78b18367 100644 --- a/gdb/gdbserver/linux-x86-low.c +++ b/gdb/gdbserver/linux-x86-low.c @@ -196,7 +196,8 @@ ps_get_thread_area (const struct ps_prochandle *ph, (void *) (intptr_t) idx, (unsigned long) &desc) < 0) return PS_ERR; - *(int *)base = desc[1]; + /* Ensure we properly extend the value to 64-bits for x86_64. */ + *base = (void *) (uintptr_t) desc[1]; return PS_OK; } }