From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31331 invoked by alias); 9 Aug 2015 11:39:31 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 31318 invoked by uid 89); 9 Aug 2015 11:39:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,UNSUBSCRIBE_BODY autolearn=no version=3.3.2 X-HELO: mail-pa0-f48.google.com Received: from mail-pa0-f48.google.com (HELO mail-pa0-f48.google.com) (209.85.220.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 09 Aug 2015 11:39:29 +0000 Received: by pacrr5 with SMTP id rr5so83457456pac.3 for ; Sun, 09 Aug 2015 04:39:27 -0700 (PDT) X-Received: by 10.68.192.9 with SMTP id hc9mr16648314pbc.57.1439120367487; Sun, 09 Aug 2015 04:39:27 -0700 (PDT) Received: from [127.0.0.1] (power-aix.osuosl.org. [140.211.15.154]) by smtp.gmail.com with ESMTPSA id t2sm16265983pdo.81.2015.08.09.04.39.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Aug 2015 04:39:26 -0700 (PDT) Message-ID: <55C73BEA.2050203@gmail.com> Date: Sun, 09 Aug 2015 11:39:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: John Breitenbach , gdb@sourceware.org Subject: Re: gdb won't single-step over ARM integer divide opcode References: <55C24FD0.8010007@lexmark.com> In-Reply-To: <55C24FD0.8010007@lexmark.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00009.txt.bz2 On 05/08/15 19:02, John Breitenbach wrote: > I did some debugging and have found that the function, > arm_get_next_pc_raw, inappropriately decodes this opcode as a load into > the PC register. (bits 24..27 are 7, bit 20 is set, and the dest > register appears to be the PC. > > Binutils's logic to disassemble the sdiv/udiv opcodes has opcode & > 0x0ff0f0f0 = 0x0710f010 (with bit 21 distinguishing between udiv and sdiv) > > I've come up with the following patch which makes my situation work. But > I don't know how complete it is, as there may be other newer opcodes > which fall into the formerly undefined instruction space. Hi John, Thanks for your patch, however, I think I've fixed this problem in patch https://sourceware.org/ml/gdb-patches/2015-06/msg00610.html Does it work for you? This commit will be in 7.10 release. > > Also, the comment "byte write to PC" around line 4930 seems wrong, as > the check for bit 22 a few lines earlier catches that situation, and > what's left is word writes to the PC." > Yeah, it is possible. Patch is welcome :) -- Yao (齐尧)