This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/RFC] mips tracepoint: fix Bug 12013
On Tue, 21 Dec 2010 23:58:29 +0800
Hui Zhu <teawater@gmail.com> wrote:
> Thanks. Do you think I can add a special name for these raw registers
> then other part can use this raw register if need.
I have a hunch that such an approach will result in an assertion
failure in mips_print_registers_info() when a raw register name is
used to attempt to print a register.
The other problem with such an approach is that it again exposes the
raw registers to the user. In this case, instead of using the name
"sp", the user would instead have to use "raw-sp" (or some such).
This is not completely horrible, but it's certainly not as nice as
allowing the user to continue referring to standard nomenclature when
using the trace machinery.
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.
Kevin