From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2637 invoked by alias); 12 Aug 2004 22:36:30 -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 2628 invoked from network); 12 Aug 2004 22:36:29 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 12 Aug 2004 22:36:29 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1BvOBR-0005Ym-62; Thu, 12 Aug 2004 18:36:29 -0400 Date: Thu, 12 Aug 2004 22:36:00 -0000 From: Daniel Jacobowitz To: Deepak Saxena Cc: gdb@sources.redhat.com Subject: Re: Remote stub can't single-step, how to tell GDB? Message-ID: <20040812223628.GA21314@nevyn.them.org> Mail-Followup-To: Deepak Saxena , gdb@sources.redhat.com References: <20040812214958.GA6063@plexity.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040812214958.GA6063@plexity.net> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-08/txt/msg00205.txt.bz2 On Thu, Aug 12, 2004 at 02:49:58PM -0700, Deepak Saxena wrote: > > Hello, > > I am working on porting the existing ARM KGDB stub into the > grand-unified-kgdb project (http://kgdb.sf.net) and am looking > for some info on how to cleanup our single-step handling. For > the existing stub we basically took the get_next_pc() code > from gdb and put it in the kgdb-stub so that we can execute > single-steps in the stub itself. When we receive an 's' command, > we call get_next_pc() and stuff the breakpoint at that address. > IMHO, having this in the kernel is overkill and skimming the gdb src, > I am guessing there is away to just force the user's client to do this, > but I am not sure how. In arm-tdep.c, I see the following comment that > makes me wonder if right now I have no choice but handle single-step > in the kernel stub: > > /* Single stepping. */ > /* XXX For an RDI target we should ask the target if it can single-step. */ > set_gdbarch_software_single_step (gdbarch, arm_software_single_step); > > Any pointers appreciated. Hi Deepak :-) Does GDB currently send single-step packets to the kgdb stub? What version of GDB are you using? The call to set_gdbarch_software_single_step sets up software (client-GDB-controlled) single stepping, and it should not ask the stub to do so. [GDB's handling of target capabilities in this area is a bit shoddy. But here it looks like the default matches what you want anyway.] -- Daniel Jacobowitz