From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20541 invoked by alias); 13 Jan 2007 17:31:20 -0000 Received: (qmail 20531 invoked by uid 22791); 13 Jan 2007 17:31:19 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 13 Jan 2007 17:31:14 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.13.8/8.13.8) with ESMTP id l0DHV9l0028776; Sat, 13 Jan 2007 18:31:09 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.13.8/8.13.8/Submit) id l0DHV9cV031712; Sat, 13 Jan 2007 18:31:09 +0100 (CET) Date: Sat, 13 Jan 2007 17:31:00 -0000 Message-Id: <200701131731.l0DHV9cV031712@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: uweigand@de.ibm.de CC: gdb-patches@sourceware.org Subject: [RFA] Fix {get|put}_frame_register_bytes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00338.txt.bz2 Hi Ulrich, Looks like there's a bug in the new get_frame_register_bytes() and put_frame_register_bytes(). I suppose the patch below is what you intended. Caught on OpenBSD/powerpc. ok? Mark Index: ChangeLog from Mark Kettenis * frame.c (get_frame_register_bytes, put_frame_register_bytes): Don't forget to move destination pointer. Index: frame.c =================================================================== RCS file: /cvs/src/src/gdb/frame.c,v retrieving revision 1.219 diff -u -p -r1.219 frame.c --- frame.c 11 Jan 2007 17:18:22 -0000 1.219 +++ frame.c 13 Jan 2007 17:28:47 -0000 @@ -775,6 +775,7 @@ get_frame_register_bytes (struct frame_i memcpy (myaddr, buf + offset, curr_len); } + myaddr += curr_len; len -= curr_len; offset = 0; regnum++; @@ -815,6 +816,7 @@ put_frame_register_bytes (struct frame_i put_frame_register (frame, regnum, buf); } + myaddr += curr_len; len -= curr_len; offset = 0; regnum++;