This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA/RFC] mips tracepoint: fix Bug 12013
- From: Hui Zhu <teawater at gmail dot com>
- To: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Sun, 19 Dec 2010 16:35:59 +0800
- Subject: [RFA/RFC] mips tracepoint: fix Bug 12013
http://sourceware.org/bugzilla/show_bug.cgi?id=12013
This bug make mips tracepoint cannot trace the backtrace.
This patch to fix this issue with a directly way just remove the
decline of access to the raw register names.
If you think it's not OK. What about add a new interface to gdbarch
to access to the raw register names.
Thanks,
Hui
2010-12-19 Hui Zhu <teawater@gmail.com>
* mips-tdep.c (mips_register_name): Remove the check.
(mips_print_registers_info): Remove the gdb_assert.
---
mips-tdep.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
--- a/mips-tdep.c
+++ b/mips-tdep.c
@@ -453,11 +453,8 @@ mips_register_name (struct gdbarch *gdba
enum mips_abi abi = mips_abi (gdbarch);
- /* Map [gdbarch_num_regs .. 2*gdbarch_num_regs) onto the raw registers,
- but then don't make the raw register names visible. */
+ /* Map [gdbarch_num_regs .. 2*gdbarch_num_regs) onto the raw registers. */
int rawnum = regno % gdbarch_num_regs (gdbarch);
- if (regno < gdbarch_num_regs (gdbarch))
- return "";
/* The MIPS integer registers are always mapped from 0 to 31. The
names of the registers (which reflects the conventions regarding
@@ -4774,7 +4771,6 @@ mips_print_registers_info (struct gdbarc
{
if (regnum != -1) /* do one specified register */
{
- gdb_assert (regnum >= gdbarch_num_regs (gdbarch));
if (*(gdbarch_register_name (gdbarch, regnum)) == '\0')
error (_("Not a valid register for the current processor type"));