From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12522 invoked by alias); 2 Mar 2011 14:12:16 -0000 Received: (qmail 12510 invoked by uid 22791); 2 Mar 2011 14:12:15 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL,TW_XT,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate2.uk.ibm.com (HELO mtagate2.uk.ibm.com) (194.196.100.162) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 Mar 2011 14:12:09 +0000 Received: from d06nrmr1707.portsmouth.uk.ibm.com (d06nrmr1707.portsmouth.uk.ibm.com [9.149.39.225]) by mtagate2.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p22EC7Jj012670 for ; Wed, 2 Mar 2011 14:12:07 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p22ECIEk1855708 for ; Wed, 2 Mar 2011 14:12:18 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p22EC6oH015652 for ; Wed, 2 Mar 2011 07:12:06 -0700 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id p22EC5vZ015623; Wed, 2 Mar 2011 07:12:05 -0700 Message-Id: <201103021412.p22EC5vZ015623@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Wed, 02 Mar 2011 15:12:05 +0100 Subject: Re: Fix magic number in arm-tdep.c To: yao@codesourcery.com (Yao Qi) Date: Wed, 02 Mar 2011 14:12:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <4D6DED4F.1030400@codesourcery.com> from "Yao Qi" at Mar 02, 2011 03:10:07 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2011-03/txt/msg00092.txt.bz2 Yao Qi wrote: > * gdb/arm-tdep.c (shifted_reg_val): Replace magic number 15 with > ARM_PC_REGNUM. > (thumb_get_next_pc_raw, arm_get_next_pc_raw): Likewise. > (displaced_write_reg, displaced_read_reg): Likewise. > (copy_ldr_str_ldrb_strb, cleanup_block_load_all): Likewise. > (cleanup_block_load_pc, copy_block_xfer): Likewise. > (cleanup_branch): Replace magic number 14 and 15 with > ARM_LR_REGNUM and ARM_PC_REGNUM respectively. This is OK, but please keep the indentation in cases like: > - nextpc = (rn == 15) ? pc_val + 8 > + nextpc = (rn == ARM_PC_REGNUM) ? pc_val + 8 > : get_frame_register_unsigned (frame, rn); (? and : should remain in the same column). Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com