From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Kevin Buettner <kevinb@redhat.com>
Subject: Re: [RFA/RFC] mips tracepoint: fix Bug 12013
Date: Wed, 22 Dec 2010 11:27:00 -0000 [thread overview]
Message-ID: <201012221126.57873.pedro@codesourcery.com> (raw)
In-Reply-To: <20101221230428.43315eea@mesquite.lan>
On Wednesday 22 December 2010 06:04:28, Kevin Buettner wrote:
> You might consider implementing a new gdbarch method which provides a
> mapping from pseudo register numbers to raw register numbers. The
> trace machinery could use such a mapping to find the corresponding raw
> register(s) when presented with a pseudo register. I can think of
> several potential pitfalls with this approach, but I think the idea is
> worth exploring.
Such mapping will necessarily be a temporary kludge -- if such a mapping
were always possible, then we wouldn't have
gdbarch_pseudo_register_read/gdbarch_pseudo_register_read callbacks, but
we'd instead have a gdbarch_pseudo_register_to_raw_register callback,
or some such.
If you're going to add support for collecting pseudo registers, I'd
much rather you added a "gdbarch_pseudo_register_collect" callback,
that emitted the agent expression bits required to collect whatever
gdbarch_pseudo_register_read needs to "read" the pseudo register
in question at trace buffer inspection time (tfind mode). In the
mips case, you'd end up with only calls to ax_reg in that new
callback, it looks to me.
(Take a look at dwarf2loc.c:compile_dwarf_to_reg and it's ax_reg call,
for example.)
--
Pedro Alves
next prev parent reply other threads:[~2010-12-22 11:27 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-19 8:36 Hui Zhu
2010-12-19 10:39 ` Mark Kettenis
2010-12-19 12:16 ` Hui Zhu
2010-12-21 14:45 ` Hui Zhu
2010-12-21 14:58 ` Mark Kettenis
2010-12-21 15:09 ` Hui Zhu
2010-12-21 15:42 ` Kevin Buettner
2010-12-21 15:59 ` Hui Zhu
2010-12-22 6:04 ` Kevin Buettner
2010-12-22 7:12 ` Hui Zhu
2010-12-22 16:20 ` Kevin Buettner
2010-12-23 3:33 ` Hui Zhu
2010-12-27 13:20 ` Hui Zhu
2010-12-27 13:56 ` Joel Brobecker
2010-12-28 4:43 ` Hui Zhu
2010-12-22 11:27 ` Pedro Alves [this message]
2010-12-25 19:10 ` Hui Zhu
2010-12-27 13:52 ` Pedro Alves
2010-12-28 9:52 ` Hui Zhu
2010-12-28 10:30 ` Pedro Alves
2010-12-28 17:09 ` Hui Zhu
2010-12-28 18:04 ` Joel Brobecker
2010-12-28 19:05 ` Pedro Alves
2010-12-28 19:07 ` Pedro Alves
2010-12-29 8:10 ` Hui Zhu
2010-12-29 13:06 ` Pedro Alves
2010-12-29 16:09 ` Hui Zhu
2010-12-29 17:57 ` Pedro Alves
2010-12-30 8:00 ` Hui Zhu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201012221126.57873.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox