From: Hui Zhu Date: Tue, 28 Dec 2010 02:29:26 +0000 (+0000) Subject: * mips-tedp.c (mips_register_name): Add comments. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6db28bf8c4066ec550dfcd5eff2e272d225e7c5d;p=thirdparty%2Fbinutils-gdb.git * mips-tedp.c (mips_register_name): Add comments. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dfb440db89f..6e81c47132b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-12-28 Kevin Buettner + Hui Zhu + + * mips-tedp.c (mips_register_name): Add comments. + 2010-12-27 Pedro Alves * breakpoint.c (breakpoint_restore_shadows): When looking for the diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 7e15041a5a9..8cd05beba02 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -449,7 +449,16 @@ mips_register_name (struct gdbarch *gdbarch, int regno) 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. */ + but then don't make the raw register names visible. This (upper) + range of user visible register numbers are the pseudo-registers. + + This approach was adopted accommodate the following scenario: + It is possible to debug a 64-bit device using a 32-bit + programming model. In such instances, the raw registers are + configured to be 64-bits wide, while the pseudo registers are + configured to be 32-bits wide. The registers that the user + sees - the pseudo registers - match the users expectations + given the programming model being used. */ int rawnum = regno % gdbarch_num_regs (gdbarch); if (regno < gdbarch_num_regs (gdbarch)) return "";