From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3747 invoked by alias); 18 Jun 2014 08:24:45 -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 3723 invoked by uid 89); 18 Jun 2014 08:24:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 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; Wed, 18 Jun 2014 08:24:41 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WxBAb-0006gB-6X from Luis_Gustavo@mentor.com ; Wed, 18 Jun 2014 01:24:37 -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); Wed, 18 Jun 2014 01:24:36 -0700 Received: from [172.30.72.8] (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; Wed, 18 Jun 2014 01:24:36 -0700 Message-ID: <53A14CC1.9070602@codesourcery.com> Date: Wed, 18 Jun 2014 08:24:00 -0000 From: Luis Machado Reply-To: User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Tim Sander , Subject: Re: gdb single stepping takes ages References: <11141246.9lllTVUqLL@dabox> In-Reply-To: <11141246.9lllTVUqLL@dabox> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00047.txt.bz2 On 06/18/2014 08:24 AM, Tim Sander wrote: > Hi > > I am currently using openocd as a gdbserver backend for debugging an embedded > target with gdb 7.7. When i want to step over a single line with -exec-next: > > for(int a=0; a<1000000;a++){ }; > > the time taken for the step is linear to the maximum count number and takes in > my setup about 1 second for one increment of a. Setting a temp breakpoint in > the next line and continuing works much faster. > > So is there a way improve the stepping speed in such situations? > > Best regards > Tim > > In that case i'd use "until " to skip the loop. Stepping through the loop *will* take a long time since GDB instruction-steps its way out of there (for reasons explained in the Remote Debugging mail you mentioned in the other mail). Luis