From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14011 invoked by alias); 29 May 2003 06:19:39 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 13955 invoked from network); 29 May 2003 06:19:38 -0000 Received: from unknown (HELO zenia.red-bean.com) (12.223.225.216) by sources.redhat.com with SMTP; 29 May 2003 06:19:38 -0000 Received: from zenia.red-bean.com (localhost.localdomain [127.0.0.1]) by zenia.red-bean.com (8.12.5/8.12.5) with ESMTP id h4T6SUFq004927; Thu, 29 May 2003 01:28:31 -0500 Received: (from jimb@localhost) by zenia.red-bean.com (8.12.5/8.12.5/Submit) id h4T6STYT004923; Thu, 29 May 2003 01:28:30 -0500 To: gdb-patches@sources.redhat.com Subject: RFA: Linux gdbserver: store register values with proper type From: Jim Blandy Date: Thu, 29 May 2003 06:19:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-05/txt/msg00526.txt.bz2 2003-05-29 Jim Blandy * linux-low.c (usr_store_inferior_registers): Transfer buf in PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise, if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing away part of the register's value. Index: gdb/gdbserver/linux-low.c =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/linux-low.c,v retrieving revision 1.21 diff -c -r1.21 linux-low.c *** gdb/gdbserver/linux-low.c 26 Mar 2003 16:36:41 -0000 1.21 --- gdb/gdbserver/linux-low.c 29 May 2003 06:15:58 -0000 *************** *** 976,982 **** { errno = 0; ptrace (PTRACE_POKEUSER, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, ! *(int *) (buf + i)); if (errno != 0) { if ((*the_low_target.cannot_store_register) (regno) == 0) --- 976,982 ---- { errno = 0; ptrace (PTRACE_POKEUSER, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, ! *(PTRACE_XFER_TYPE *) (buf + i)); if (errno != 0) { if ((*the_low_target.cannot_store_register) (regno) == 0)