From patchwork Fri Mar 4 16:39:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Weigand X-Patchwork-Id: 342 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:41:50 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs20826qah; Fri, 4 Mar 2011 08:39:05 -0800 (PST) Received: by 10.213.13.74 with SMTP id b10mr581529eba.72.1299256744707; Fri, 04 Mar 2011 08:39:04 -0800 (PST) Received: from mtagate1.uk.ibm.com (mtagate1.uk.ibm.com [194.196.100.161]) by mx.google.com with ESMTPS id t51si5346821eeh.94.2011.03.04.08.39.04 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2011 08:39:04 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning uweigand@de.ibm.com does not designate 194.196.100.161 as permitted sender) client-ip=194.196.100.161; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning uweigand@de.ibm.com does not designate 194.196.100.161 as permitted sender) smtp.mail=uweigand@de.ibm.com Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate1.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p24Gd3Hv021328 for ; Fri, 4 Mar 2011 16:39:03 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p24GdGcD1740966 for ; Fri, 4 Mar 2011 16:39:16 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 p24Gd30W005666 for ; Fri, 4 Mar 2011 09:39:03 -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 p24Gd2pv005644 for ; Fri, 4 Mar 2011 09:39:02 -0700 Message-Id: <201103041639.p24Gd2pv005644@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 04 Mar 2011 17:39:02 +0100 Subject: [commit] Fix build break on ARM To: patches@linaro.org Date: Fri, 4 Mar 2011 17:39:02 +0100 (CET) From: "Ulrich Weigand" X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 http://sourceware.org/ml/gdb-patches/2011-02/msg00024.html ChangeLog: * arm-tdep.c (arm_analyze_load_stack_chk_guard): Avoid build break due to accessing uninitialized variable. Fix indentation. Index: gdb/arm-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/arm-tdep.c,v retrieving revision 1.321 diff -u -p -r1.321 arm-tdep.c --- gdb/arm-tdep.c 14 Jan 2011 20:37:13 -0000 1.321 +++ gdb/arm-tdep.c 2 Feb 2011 16:21:35 -0000 @@ -1198,29 +1198,30 @@ arm_analyze_load_stack_chk_guard(CORE_AD } else { - unsigned int insn - = read_memory_unsigned_integer (pc, 4, byte_order_for_code); - - if ((insn & 0x0e5f0000) == 0x041f0000) /* ldr Rd, #immed */ - { - address = bits (insn, 0, 11); - *destreg = bits (insn, 12, 15); - *offset = 4; - } - else if ((insn & 0x0ff00000) == 0x03000000) /* movw Rd, #const */ - { - low = EXTRACT_MOVW_MOVT_IMM_A (insn); + unsigned int insn + = read_memory_unsigned_integer (pc, 4, byte_order_for_code); - insn - = read_memory_unsigned_integer (pc + 4, 4, byte_order_for_code); + if ((insn & 0x0e5f0000) == 0x041f0000) /* ldr Rd, #immed */ + { + address = bits (insn, 0, 11); + *destreg = bits (insn, 12, 15); + *offset = 4; + } + else if ((insn & 0x0ff00000) == 0x03000000) /* movw Rd, #const */ + { + low = EXTRACT_MOVW_MOVT_IMM_A (insn); - if ((insn & 0x0ff00000) == 0x03400000) /* movt Rd, #const */ - high = EXTRACT_MOVW_MOVT_IMM_A (insn); + insn + = read_memory_unsigned_integer (pc + 4, 4, byte_order_for_code); - address = (high << 16 | low); - *destreg = bits (insn, 12, 15); - *offset = 8; - } + if ((insn & 0x0ff00000) == 0x03400000) /* movt Rd, #const */ + { + high = EXTRACT_MOVW_MOVT_IMM_A (insn); + *destreg = bits (insn, 12, 15); + *offset = 8; + address = (high << 16 | low); + } + } } return address;