diff options
author | Hui Zhu <teawater@gmail.com> | 2010-12-27 08:17:34 +0000 |
---|---|---|
committer | Hui Zhu <teawater@gmail.com> | 2010-12-27 08:17:34 +0000 |
commit | 6229fbeaa6a1731bce66a5b51b0affec3070542e (patch) | |
tree | a4f4cfe32278ed944f27396f550ac0e6d9d2d5f4 /gdb/mips-tdep.c | |
parent | a64718d3b10db2e9c52e14df4e221b5f127edbff (diff) | |
download | gdb-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.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 11 |
1 files changed, 10 insertions, 1 deletions
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 ""; |