This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Hacking gdbserver to capture instruction-level code coverage
- From: Daniel Jacobowitz <drow at false dot org>
- To: Ron McCall <ronald dot mccall at snet dot net>
- Cc: gdb at sourceware dot org
- Date: Wed, 21 Jun 2006 11:31:02 -0400
- Subject: Re: Hacking gdbserver to capture instruction-level code coverage
- References: <20060621152810.56441.qmail@web80332.mail.yahoo.com>
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