From patchwork Mon Jun 29 16:31:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 7421 Received: (qmail 93406 invoked by alias); 29 Jun 2015 16:32:09 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk 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 93382 invoked by uid 89); 29 Jun 2015 16:32:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f178.google.com Received: from mail-pd0-f178.google.com (HELO mail-pd0-f178.google.com) (209.85.192.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 29 Jun 2015 16:32:06 +0000 Received: by pdbci14 with SMTP id ci14so119397129pdb.2 for ; Mon, 29 Jun 2015 09:32:04 -0700 (PDT) X-Received: by 10.66.119.174 with SMTP id kv14mr33232642pab.5.1435595524295; Mon, 29 Jun 2015 09:32:04 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id ks7sm42717250pbc.34.2015.06.29.09.32.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Jun 2015 09:32:03 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH] Handle media instructions in arm software single step. Date: Mon, 29 Jun 2015 17:31:56 +0100 Message-Id: <1435595516-17404-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes This patch fixes PR 18605 which is about incorrectly decoding media instructions in software single step. gdb: 2015-06-29 Yao Qi PR tdep/18605 * arm-tdep.c (arm_get_next_pc_raw): Break for media instructions. --- gdb/arm-tdep.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index c99f2a9..527bd01 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -4927,6 +4927,13 @@ arm_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc) case 0x5: /* data transfer */ case 0x6: case 0x7: + if (bits (this_instr, 25, 27) == 0x3 && bit (this_instr, 4) == 1) + { + /* Media instructions and architecturally undefined + instructions. */ + break; + } + if (bit (this_instr, 20)) { /* load */