From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32511 invoked by alias); 21 Jun 2006 15:31:11 -0000 Received: (qmail 32502 invoked by uid 22791); 21 Jun 2006 15:31:11 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 21 Jun 2006 15:31:09 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1Ft4fW-0001Ov-Sq; Wed, 21 Jun 2006 11:31:02 -0400 Date: Wed, 21 Jun 2006 16:51:00 -0000 From: Daniel Jacobowitz To: Ron McCall Cc: gdb@sourceware.org Subject: Re: Hacking gdbserver to capture instruction-level code coverage Message-ID: <20060621153102.GA5320@nevyn.them.org> Mail-Followup-To: Ron McCall , gdb@sourceware.org References: <20060621152810.56441.qmail@web80332.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060621152810.56441.qmail@web80332.mail.yahoo.com> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00175.txt.bz2 On Wed, Jun 21, 2006 at 08:28:10AM -0700, Ron McCall wrote: > I have attempted to hack gdbserver 6.5 to log > instruction-level code coverage on a powerpc-linux > system and it seems to work except that examining > variables is broken as a result. Turning on remote > debugging in gdb and comparing a run using an > unmodified gdbserver and the modified gdbserver seems > to show a difference with the DBAT0 register mapping > in the 'g' packet responses. It would seem that my > changes have somehow violated something and perhaps > has confused the Linux kernel? At this point you've lost me. The PPC 'g' packet contains r0-r31, f0-f31, pc, ps, cr, lr, ctr, xer, and fpscr. The BAT registers aren't involved at all; I don't even think they're usable from userspace. > Does any of this sound particularly evil? I can > provide the small patch against the 6.5 source if > anyone needs to see the changes in more detail. Evil but functional, as long as you're being careful to not lose track of signals. -- Daniel Jacobowitz CodeSourcery