aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Zhu <teawater@gmail.com>2010-12-27 08:17:34 +0000
committerHui Zhu <teawater@gmail.com>2010-12-27 08:17:34 +0000
commit6229fbeaa6a1731bce66a5b51b0affec3070542e (patch)
treea4f4cfe32278ed944f27396f550ac0e6d9d2d5f4
parenta64718d3b10db2e9c52e14df4e221b5f127edbff (diff)
downloadgdb-6229fbeaa6a1731bce66a5b51b0affec3070542e.zip
gdb-6229fbeaa6a1731bce66a5b51b0affec3070542e.tar.gz
gdb-6229fbeaa6a1731bce66a5b51b0affec3070542e.tar.bz2
2010-12-27 Kevin Buettner <kevinb@redhat.com>
Hui Zhu <teawater@gmail.com> * mips-tedp.c (mips_register_name): Add comments.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/mips-tdep.c11
2 files changed, 15 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1089078..33f2d8f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-27 Kevin Buettner <kevinb@redhat.com>
+ Hui Zhu <teawater@gmail.com>
+
+ * mips-tedp.c (mips_register_name): Add comments.
+
2010-12-23 Yao Qi <yao@codesourcery.com>
* arm-tdep.c (thumb_analyze_prologue): Move some code ...
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 81f2d7d..e6df5f5 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -454,7 +454,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 "";