]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* mips-tedp.c (mips_register_name): Add comments.
authorHui Zhu <teawater@gmail.com>
Tue, 28 Dec 2010 02:29:26 +0000 (02:29 +0000)
committerHui Zhu <teawater@gmail.com>
Tue, 28 Dec 2010 02:29:26 +0000 (02:29 +0000)
gdb/ChangeLog
gdb/mips-tdep.c

index dfb440db89fefb90e768013b0f0e256887a112be..6e81c47132b7f4d4f1b7c406219e8f3c6b9a6870 100644 (file)
@@ -1,3 +1,8 @@
+2010-12-28  Kevin Buettner  <kevinb@redhat.com>
+            Hui Zhu  <teawater@gmail.com>
+
+       * mips-tedp.c (mips_register_name): Add comments.
+
 2010-12-27  Pedro Alves  <pedro@codesourcery.com>
 
        * breakpoint.c (breakpoint_restore_shadows): When looking for the
index 7e15041a5a9569248a54ab6c581d0acd3bd09c94..8cd05beba02eec5fcb8b4ee5a21ee42a1e5e8450 100644 (file)
@@ -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 "";