From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26830 invoked by alias); 11 Aug 2009 23:00:25 -0000 Received: (qmail 26752 invoked by uid 22791); 11 Aug 2009 23:00:17 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Aug 2009 23:00:09 +0000 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1Mb0K2-0005hW-TA for gdb@sources.redhat.com; Tue, 11 Aug 2009 23:00:02 +0000 Received: from 82-68-48-14.dsl.in-addr.zen.co.uk ([82.68.48.14]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 11 Aug 2009 23:00:02 +0000 Received: from jsmith by 82-68-48-14.dsl.in-addr.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 11 Aug 2009 23:00:02 +0000 To: gdb@sources.redhat.com From: Julian Smith Subject: Some questions about gdb's remote protocol and reverse debugging Date: Tue, 11 Aug 2009 23:00:00 -0000 Message-ID: <20090811224401.4d9e8942.jsmith@undo-software.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2009-08/txt/msg00078.txt.bz2 Hello I've been trying out gdb-cvs's remote protocol, specifically the commands for reverse debugging, and i have a couple of questions that i was hoping someone might be able to help me with. I'm using Linux on x86-32 and x86-64. First, if i'm understanding things correctly, gdb appears to default to software breakpoints, using the 'Z0' and 'z0' commands and, if these aren't supported by the remote target, it then tries to use 'M' and 'm' to write breakpoints directly into the inferior's memory. Is there any way to tell gdb to try to use hardware breakpoints (with the 'Z1' and 'z1' commands) before resorting to 'M' and 'm' ? [In the environment i'm working in, UndoDB, hardware breakpoints are more convenient because they don't require any patching up of %pc, and poking breakpoints directly into memory is not supported.] Second, am i right in thinking that gdb does things like reverse-step and reverse-next by effectively doing many reverse-stepi's (with 'bs'), interleaved with 'g' commands to get the registers? If so, are there any plans to try to avoid the overhead of this somehow ? Many thanks, - Julian -- http://undo-software.com/