aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-05-31 19:14:33 +0000
committerDoug Evans <dje@google.com>2013-05-31 19:14:33 +0000
commitd1ec4ce7c989d92f6e1b171b741c67dd2212e7ed (patch)
treeebfdf1cf4e93b98cb056a763c3d62a1b91204e83 /gdb/gdbserver
parentf60cf82f204ed6f59ced98ca15b5d50ced6d5aea (diff)
downloadgdb-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/ChangeLog5
-rw-r--r--gdb/gdbserver/linux-x86-low.c3
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;
}
}