From patchwork Sun Nov 2 21:41:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vkamensky X-Patchwork-Id: 39992 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F13BB2405B for ; Sun, 2 Nov 2014 21:41:56 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id r20sf2105814wiv.2 for ; Sun, 02 Nov 2014 13:41:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:cc:subject:date :message-id:x-original-sender:x-original-authentication-results; bh=n3Rk6skwdrrkblSLZs+5Lr0K5/eIbjlAPYylRVLL0+A=; b=kxnaBNbLCSNA6YmSdM8ly4P0RUL+d0l2kxo9xro9txrZHYYA+YD742QGXUxpqKNjkN 7r/w/7+WqxS13727V3RUBQ9rlwy/EjER0/LydFsASsmRVnEs3mLmXai8uqbLV6SsBSe5 ES2g7mKkJx+B1XAlRTM3Fy63k0RU+khptk786qyvJXgZ9e5BInxUlQdc8WJjoQfYiQD3 B792FzT3qCMuftyYJvo8y4eisvHQDdPITz8FtZjcXst+3XzNWwgRdSGOYEU7OCENNTqc QgRDLBcneWWdDTLa0PwfQO/pIMupVDdatS/NY9NiyemJwEWbgfX7DNned3tmLdjTPFyC lXvw== X-Gm-Message-State: ALoCoQnvucfgBk54OflFtj4sJviXxza7j9qVRJmzeDvuoawPDu91blplO1ANN3VD0csKe/BfMkrF X-Received: by 10.112.77.9 with SMTP id o9mr3065592lbw.6.1414964516160; Sun, 02 Nov 2014 13:41:56 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.226 with SMTP id b2ls629629lak.36.gmail; Sun, 02 Nov 2014 13:41:55 -0800 (PST) X-Received: by 10.112.63.70 with SMTP id e6mr7895008lbs.93.1414964515957; Sun, 02 Nov 2014 13:41:55 -0800 (PST) Received: from mail-lb0-x22d.google.com (mail-lb0-x22d.google.com. [2a00:1450:4010:c04::22d]) by mx.google.com with ESMTPS id ed2si29778457lbc.37.2014.11.02.13.41.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Nov 2014 13:41:55 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22d as permitted sender) client-ip=2a00:1450:4010:c04::22d; Received: by mail-lb0-f173.google.com with SMTP id p9so2786030lbv.18 for ; Sun, 02 Nov 2014 13:41:55 -0800 (PST) X-Received: by 10.112.130.41 with SMTP id ob9mr45168508lbb.74.1414964515800; Sun, 02 Nov 2014 13:41:55 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp162508lbz; Sun, 2 Nov 2014 13:41:55 -0800 (PST) X-Received: by 10.68.213.138 with SMTP id ns10mr35923837pbc.50.1414964514002; Sun, 02 Nov 2014 13:41:54 -0800 (PST) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id da6si13885742pdb.164.2014.11.02.13.41.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Nov 2014 13:41:53 -0800 (PST) Received-SPF: pass (google.com: domain of gdb-patches-return-117238-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 3737 invoked by alias); 2 Nov 2014 21:41:47 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list List-Id: List-Unsubscribe: , List-Subscribe: List-Archive: List-Post: , List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 3726 invoked by uid 89); 2 Nov 2014 21:41:46 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f49.google.com Received: from mail-pa0-f49.google.com (HELO mail-pa0-f49.google.com) (209.85.220.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 02 Nov 2014 21:41:45 +0000 Received: by mail-pa0-f49.google.com with SMTP id lj1so10932292pab.36 for ; Sun, 02 Nov 2014 13:41:43 -0800 (PST) X-Received: by 10.70.34.206 with SMTP id b14mr33113126pdj.10.1414964503654; Sun, 02 Nov 2014 13:41:43 -0800 (PST) Received: from kamensky-w530.hsd1.ca.comcast.net ([24.6.79.41]) by mx.google.com with ESMTPSA id ej7sm7913403pdb.88.2014.11.02.13.41.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Nov 2014 13:41:42 -0800 (PST) From: Victor Kamensky To: gdb-patches@sourceware.org Cc: Yao Qi , Victor Kamensky Subject: [COMMITTED PATCH 1/3] ARM: extract_arm_insn function need to read instrs correctly in be8 case Date: Sun, 2 Nov 2014 13:41:22 -0800 Message-Id: <1414964484-6270-1-git-send-email-victor.kamensky@linaro.org> X-Original-Sender: victor.kamensky@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22d as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 extract_arm_insn function needs to read instructions in gdbarch_byte_order_for_code byte order, because in case armv7b, even data is big endian, instructions are still little endian. Currently function uses gdbarch_byte_order which would be big endian in armv7b case. Because of this issue pretty much all gdb.reverse/ tests are failing with 'Process record does not support instruction' message. Fix is to change gdbarch_byte_order to gdbarch_byte_order_for_code, when passed to extract_unsigned_integer that reads instruction. gdb/ChangeLog: 2014-11-02 Victor Kamensky * arm-tdep.c (extract_arm_insn): Use gdbarch_byte_order_for_code to read arm instruction. --- gdb/arm-tdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 43520cc..9e632a7 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -13811,7 +13811,7 @@ extract_arm_insn (insn_decode_record *insn_record, uint32_t insn_size) return 1; insn_record->arm_insn = (uint32_t) extract_unsigned_integer (&buf[0], insn_size, - gdbarch_byte_order (insn_record->gdbarch)); + gdbarch_byte_order_for_code (insn_record->gdbarch)); return 0; }