]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* linux-x86-low.c (ps_get_thread_area): Properly extend address to
authorDoug Evans <dje@google.com>
Wed, 5 Jun 2013 21:15:41 +0000 (21:15 +0000)
committerDoug Evans <dje@google.com>
Wed, 5 Jun 2013 21:15:41 +0000 (21:15 +0000)
64 bits in 64-cross-32 environment.

gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-x86-low.c

index 3ca7f1ee8e24d8a9702cab882d92e9bf32ca705d..bc2d414967061d8dc50fb5710e92e839ceb35340 100644 (file)
@@ -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-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
 
        * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
index 31657d3f07cca9df2395eac3c062afa6e4a344a5..72a703b1d9d3d1712055adcdf37ae63a6753bb6c 100644 (file)
@@ -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;
   }
 }