From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22668 invoked by alias); 3 Sep 2004 16:03:31 -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 22661 invoked from network); 3 Sep 2004 16:03:30 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 3 Sep 2004 16:03:30 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1C3GXC-0004vC-Al; Fri, 03 Sep 2004 12:03:30 -0400 Date: Fri, 03 Sep 2004 16:03:00 -0000 From: Daniel Jacobowitz To: Orjan Friberg Cc: gdb@sources.redhat.com Subject: Re: Register fudging (CRISv32) Message-ID: <20040903160329.GA18755@nevyn.them.org> Mail-Followup-To: Orjan Friberg , gdb@sources.redhat.com References: <4138656F.9020001@axis.com> <20040903134721.GA1028@nevyn.them.org> <4138800F.9050503@axis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4138800F.9050503@axis.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-09/txt/msg00037.txt.bz2 On Fri, Sep 03, 2004 at 04:30:39PM +0200, Orjan Friberg wrote: > Daniel Jacobowitz wrote: > > > > Daniel, thanks for you answers. > > >Up to you. I think doing it in the kernel stub and kernel ptrace > >support is a better strategy, esp. if you have additional information > >confirming that a breakpoint was hit. > > In the kernel I know for sure it was a breakpoint (or, more > specifically, a certain break instruction was executed, which is how > ordinary breakpoints are implemented). > > >There's arguments both ways for this. For instance, I think it would > >be reasonable to do this in the kernel. > > Except for the fact that the "PC" doesn't exist in the kernel - it's a > made up register, which is set either from the exception return pointer > register (+ possibly delay slot adjustment), or from the single-step PC > (when we're single-stepping that is). Or are you suggesting that the > pseudo-PC *should be* in the kernel (if not part of the pt_regs struct, > then at least accessible by ptrace)? Precisely. It sounds like the kernel can do a more accuarate job than gdbserver can easily. For instance, if we single-step a task, and detach leaving it stopped, and attach another debugger - that debugger won't have the state to know whether the task was last stepped or trapped. > >Not sure what you mean by this. > > For example, in case of a PTRACE_CONT I set the single-step PC to 0 to > disable single-stepping (similar to what the m68k does). Ah, I think I see. I don't remember what your original question was though :-) -- Daniel Jacobowitz