diff options
author | Doug Evans <dje@google.com> | 2013-05-31 19:14:33 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2013-05-31 19:14:33 +0000 |
commit | d1ec4ce7c989d92f6e1b171b741c67dd2212e7ed (patch) | |
tree | ebfdf1cf4e93b98cb056a763c3d62a1b91204e83 /gdb/gdbserver | |
parent | f60cf82f204ed6f59ced98ca15b5d50ced6d5aea (diff) | |
download | gdb-d1ec4ce7c989d92f6e1b171b741c67dd2212e7ed.zip gdb-d1ec4ce7c989d92f6e1b171b741c67dd2212e7ed.tar.gz gdb-d1ec4ce7c989d92f6e1b171b741c67dd2212e7ed.tar.bz2 |
* linux-x86-low.c (ps_get_thread_area): Properly extend address to
64 bits in 64-cross-32 environment.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbserver/linux-x86-low.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index bbdac13..fb0eed6 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2013-05-31 Doug Evans <dje@google.com> + + * linux-x86-low.c (ps_get_thread_area): Properly extend address to + 64 bits in 64-cross-32 environment. + 2013-05-28 Pedro Alves <palves@redhat.com> * 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 1d1df95..dfe78b1 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; } } |