From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11347 invoked by alias); 3 Jun 2014 11:55:16 -0000 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 Received: (qmail 11329 invoked by uid 89); 3 Jun 2014 11:55:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Jun 2014 11:55:14 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WrnJ6-0007DE-SF from Yao_Qi@mentor.com ; Tue, 03 Jun 2014 04:55:08 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 3 Jun 2014 04:55:08 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Tue, 3 Jun 2014 04:55:08 -0700 Message-ID: <538DB721.30308@codesourcery.com> Date: Tue, 03 Jun 2014 11:55:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Pedro Alves , Joel Brobecker CC: Subject: Re: [RFA/7.8] user breakpoint not inserted if software-single-step at same location References: <1401394280-14999-1-git-send-email-brobecker@adacore.com> <5387BFF0.6010208@redhat.com> <20140530122253.GC4289@adacore.com> <53887ED5.5050603@redhat.com> <20140530132659.GD4289@adacore.com> <5388AA76.4070101@redhat.com> In-Reply-To: <5388AA76.4070101@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00076.txt.bz2 On 05/30/2014 11:57 PM, Pedro Alves wrote: > +int > +main (void) > +{ > + /* Assume writes to integers compile to a single instruction. */ This assumption is wrong on arm at least. > + volatile int i = 0; > + > + i = 1; /* set foo break here */ > + i = 2; /* set bar break here */ > + return 0; > +} Each line is compiled to two instructions. 27 i = 1; /* set foo break here */ 0x0000025c <+20>: mov r3, #1 0x00000260 <+24>: str r3, [r11, #-8] 28 i = 2; /* set bar break here */ 0x00000264 <+28>: mov r3, #2 0x00000268 <+32>: str r3, [r11, #-8] > +# On software single-step targets, this step will want to momentarily > +# place a single-step breakpoint over the bar breakpoint, and then > +# remove it. But, a regular breakpoint it planted there already, and > +# with always-inserted on, should remain planted when the step > +# finishes. > +gdb_test "si" "Breakpoint .* bar break .*" this test will fail, because it still stops at "foo break". -- Yao (齐尧)