From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15210 invoked by alias); 16 May 2005 12:40:32 -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 14769 invoked from network); 16 May 2005 12:40:21 -0000 Received: from unknown (HELO mtagate3.de.ibm.com) (195.212.29.152) by sourceware.org with SMTP; 16 May 2005 12:40:21 -0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate3.de.ibm.com (8.12.10/8.12.10) with ESMTP id j4GCeKJl127320 for ; Mon, 16 May 2005 12:40:20 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j4GCeKbc093384 for ; Mon, 16 May 2005 14:40:20 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11/8.13.3) with ESMTP id j4GCeKpJ032400 for ; Mon, 16 May 2005 14:40:20 +0200 Received: from 53v30g15.boeblingen.de.ibm.com (53v30g15.boeblingen.de.ibm.com [9.152.26.155]) by d12av02.megacenter.de.ibm.com (8.12.11/8.12.11) with ESMTP id j4GCeKaq032397; Mon, 16 May 2005 14:40:20 +0200 Received: from 53v30g15.boeblingen.de.ibm.com (localhost [127.0.0.1]) by 53v30g15.boeblingen.de.ibm.com (8.12.10/8.12.10) with ESMTP id j4GCe2ql016327; Mon, 16 May 2005 14:40:02 +0200 Received: (from uweigand@localhost) by 53v30g15.boeblingen.de.ibm.com (8.12.10/8.12.10/Submit) id j4GCe21a016326; Mon, 16 May 2005 14:40:02 +0200 From: Ulrich Weigand Message-Id: <200505161240.j4GCe21a016326@53v30g15.boeblingen.de.ibm.com> Subject: Re: [COMMIT] Update s390-tdep.c to gdb_byte changes To: mark.kettenis@xs4all.nl (Mark Kettenis) Date: Mon, 16 May 2005 16:37:00 -0000 Cc: uweigand@de.ibm.com, gdb-patches@sources.redhat.com In-Reply-To: <200505161120.j4GBKY5J032444@elgar.sibelius.xs4all.nl> from "Mark Kettenis" at May 16, 2005 01:20:34 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2005-05/txt/msg00402.txt.bz2 Mark Kettenis wrote: > Great. There are some casts in s390_return_value() that can go now, > and s390_breakpoint_from_pc() should also be converted to use gdb_byte > instead of unsigned char. Would be great if you could do that too. Sorry for missing those. I've now applied the following patch, too. Bye, Ulrich ChangeLog: * s390-tdep.c (s390_return_value): Remove unnecessary casts. (s390_breakpoint_from_pc): Change type of return value and 'breakpoint' to const gdb_byte *. Index: gdb/s390-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/s390-tdep.c,v retrieving revision 1.144 diff -c -p -r1.144 s390-tdep.c *** gdb/s390-tdep.c 16 May 2005 10:55:03 -0000 1.144 --- gdb/s390-tdep.c 16 May 2005 12:20:37 -0000 *************** s390_return_value (struct gdbarch *gdbar *** 2726,2733 **** else if (length == 2*word_size) { regcache_cooked_write (regcache, S390_R2_REGNUM, in); ! regcache_cooked_write (regcache, S390_R3_REGNUM, ! (const char *)in + word_size); } else internal_error (__FILE__, __LINE__, _("invalid return type")); --- 2726,2732 ---- else if (length == 2*word_size) { regcache_cooked_write (regcache, S390_R2_REGNUM, in); ! regcache_cooked_write (regcache, S390_R3_REGNUM, in + word_size); } else internal_error (__FILE__, __LINE__, _("invalid return type")); *************** s390_return_value (struct gdbarch *gdbar *** 2759,2766 **** else if (length == 2*word_size) { regcache_cooked_read (regcache, S390_R2_REGNUM, out); ! regcache_cooked_read (regcache, S390_R3_REGNUM, ! (char *)out + word_size); } else internal_error (__FILE__, __LINE__, _("invalid return type")); --- 2758,2764 ---- else if (length == 2*word_size) { regcache_cooked_read (regcache, S390_R2_REGNUM, out); ! regcache_cooked_read (regcache, S390_R3_REGNUM, out + word_size); } else internal_error (__FILE__, __LINE__, _("invalid return type")); *************** s390_return_value (struct gdbarch *gdbar *** 2778,2787 **** /* Breakpoints. */ ! static const unsigned char * s390_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) { ! static unsigned char breakpoint[] = { 0x0, 0x1 }; *lenptr = sizeof (breakpoint); return breakpoint; --- 2776,2785 ---- /* Breakpoints. */ ! static const gdb_byte * s390_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) { ! static const gdb_byte breakpoint[] = { 0x0, 0x1 }; *lenptr = sizeof (breakpoint); return breakpoint; -- Dr. Ulrich Weigand Linux on zSeries Development Ulrich.Weigand@de.ibm.com