From: Joel Brobecker <brobecker@adacore.com>
To: Aleksandar Ristovski <aristovski@qnx.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] mips-tdep: info registers
Date: Mon, 23 Feb 2009 02:52:00 -0000 [thread overview]
Message-ID: <20090223020820.GC26056@adacore.com> (raw)
In-Reply-To: <gn1iej$o3b$1@ger.gmane.org>
> (gdb) info registers $1
> ../../gdb/mips-tdep.c:4307: internal-error:
> mips_print_registers_info:
> Assertion `regnum >= gdbarch_num_regs (current_gdbarch)'
> failed.
Surprisingly, this feature is not documented yet. The documentation
mentions "info registers regname", but not "info registers regno".
Would you mind adding a line or two and sending a (separate) patch
to this list? Eli is the documentation guru...
> (gdb) info registers $1
> at: 0x8020000
> 2009-02-12 Aleksandar Ristovski <aristovski@qnx.com>
>
> * mips-tdep.c (mips_print_registers_info): Map raw register number to
> pseudo register.
This seems reasonable to me.
Just being a documentation freak, can you provide a more detailed
comment about what is happening and what you are doing?
Below is my suggestion - adjust as you think is best...
> - gdb_assert (regnum >= gdbarch_num_regs (gdbarch));
> + if (regnum < gdbarch_num_regs (gdbarch)
> + && regnum >= 0)
> + regnum += gdbarch_num_regs (gdbarch); /* Print pseudo register. */
/* If given a raw register number, convert it to its associated
pseudo register number first, since the rest of this code requires
a pseudo register. */
Pre-approved with the addition of the comment requested. Can you also
confirm that you were able to check this change against the testsuite?
I don't see how this could negatively affect the debugger, but you
never know sometimes...
Thanks,
--
Joel
next prev parent reply other threads:[~2009-02-23 2:08 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-12 16:24 Aleksandar Ristovski
2009-02-23 2:52 ` Joel Brobecker [this message]
2009-02-23 3:00 ` Daniel Jacobowitz
2009-02-23 3:13 ` Joel Brobecker
2009-02-23 8:53 ` Eli Zaretskii
2009-02-23 16:18 ` Aleksandar Ristovski
2009-02-24 1:32 ` Eli Zaretskii
2009-02-23 8:56 ` Mark Kettenis
2009-02-23 16:26 ` Aleksandar Ristovski
2009-02-23 17:15 ` Daniel Jacobowitz
2009-02-23 17:36 ` Joel Brobecker
2009-02-23 18:24 ` Aleksandar Ristovski
2009-02-23 20:02 ` Aleksandar Ristovski
2009-02-27 20:36 ` Joel Brobecker
2009-03-04 21:47 ` Aleksandar Ristovski
2009-03-05 19:12 ` Joel Brobecker
2009-03-05 19:22 ` Daniel Jacobowitz
2009-03-05 19:27 ` Aleksandar Ristovski
2009-03-05 19:35 ` Daniel Jacobowitz
2009-03-05 22:50 ` Joel Brobecker
2009-03-05 23:08 ` Daniel Jacobowitz
2009-03-06 5:00 ` Aleksandar Ristovski
2009-03-06 12:25 ` Daniel Jacobowitz
2009-03-06 14:52 ` Aleksandar Ristovski
2009-04-01 18:50 ` Joel Brobecker
2009-04-01 19:16 ` Aleksandar Ristovski
2009-02-24 20:24 ` Maciej W. Rozycki
2009-02-25 2:15 ` Aleksandar Ristovski
2009-02-25 7:04 ` Maciej W. Rozycki
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=20090223020820.GC26056@adacore.com \
--to=brobecker@adacore.com \
--cc=aristovski@qnx.com \
--cc=gdb-patches@sources.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