From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18257 invoked by alias); 10 Jun 2014 21:13:01 -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 18248 invoked by uid 89); 10 Jun 2014 21:13:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: ausxipps301.us.dell.com Received: from ausxipps301.us.dell.com (HELO ausxipps301.us.dell.com) (143.166.148.223) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 10 Jun 2014 21:12:59 +0000 X-LoopCount0: from 10.170.28.41 From: To: CC: Subject: Re: Remote Debugging with NEXT Command Date: Tue, 10 Jun 2014 21:13:00 -0000 Message-ID: <2133A63B-319A-4185-BC0F-C9C9CEDBD575@dell.com> References: <53977260.9080700@mathcs.emory.edu> In-Reply-To: <53977260.9080700@mathcs.emory.edu> Content-Type: text/plain; charset="Windows-1252" Content-ID: <27839ABE29028E4FB2B882FBAC1F7FD5@dell.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00033.txt.bz2 On Jun 10, 2014, at 5:02 PM, Ken Mandelberg wrote: > I'm doing remote gdb deugging to a stub implemented on the target over tc= p. SI works and NEXT works well enough skipping over a function call. >=20 > What can be very slow is NEXT from one C statement to the next. >=20 > When NEXT skips over a function call it implements it by setting a breakp= oint at the return address. >=20 > When NEXT skips from one C statement to the next, it does it by doing rep= eated SI's. This forces the target to send back a bunch of state at > each SI. This is slow and very slow if the C statement actually has a loo= p in it. >=20 > Is there any way around this other than carefully avoiding NEXT in the wo= rst cases and manually setting breakpoints/CONT? If your stub supports breakpoints, it will take less work for GDB to do the= stepping. Basic stepping involves placing break instructions and restorin= g the content, repeatedly. That=92s a lot more round trips but it requires= less stub magic. paul