From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27275 invoked by alias); 28 Sep 2002 00:44:51 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 27267 invoked from network); 28 Sep 2002 00:44:49 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 28 Sep 2002 00:44:49 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id CDB363D44; Fri, 27 Sep 2002 20:44:48 -0400 (EDT) Message-ID: <3D94FB80.4030201@redhat.com> Date: Fri, 27 Sep 2002 17:44:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Wendy Peikes Cc: gdb Subject: Re: Anyone using efficient algorithm or HW support for NEXT/STEP? References: <3D94C824.62A5113B@cisco.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00495.txt.bz2 Some thoughts: - The latest GDB supports ``set trust-readonly-sections'' on. Which stops GDB going to the target for prologe analysis. This is a big win. - enhance the ``T'' packet to return registers such as PC, FP, ARG0, ... that can help avoid the need for GDB to fetch all registers - investigate a thread aware step-out-of-range packet. Andrew > Here at Cisco, we've gotten both the host (started with gnu gdb 5.0) > and target gdb working for arm-elf. > > (Note: I'd be glad to answer any questions about the arm gdb host > side and help with target-side questions) > > We're (my target-side colleague and myself) are wondering if someone > is using a better algorithm for the NEXT and STEP commands: > > Our gdb's single stepping is very slow. Current implementation (A) > (Note: applies, in general, to all platforms, not just to arm): > 1- restore user installed breakpoints > 2- command to single step. > 3- ack and set temp breakpoint(s). > For arm, sets two temp breakpoints on branches and function calls; > one at the destination and one at next instruction. These cover > conditional execution either way it may go. > 4- exception signal > 5- remove breakpoints > 6- collect regs to see where we are. > 7- if still between start addr and stop addr, repeat, > if == stop addr: stop > 8 - if in another function, determine return addr and > set breakpoint there > 9 - continue > 10 - go to 4 > > When it could be more efficient, simpler, and more robust to do B: > 1- restore user installed breakpoints > 2- set a temp breakpoint at stop addr > 3 - continue > 4- exception signal > 5- collect regs and display where we are > > Is anyone out there using a more efficient algorithm similar to B? > Also, is anyone using hardware single-stepping or hardware-assisted > stepping? For which platforms? > > Thank you much for your help, > > Wendy Peikes > Cisco Systems > Software Tools Group > GDB Support >