From 6229fbeaa6a1731bce66a5b51b0affec3070542e Mon Sep 17 00:00:00 2001 From: Hui Zhu Date: Mon, 27 Dec 2010 08:17:34 +0000 Subject: [PATCH] 2010-12-27 Kevin Buettner Hui Zhu * mips-tedp.c (mips_register_name): Add comments. --- gdb/ChangeLog | 5 +++++ gdb/mips-tdep.c | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 108907828c7..33f2d8f17be 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-12-27 Kevin Buettner + Hui Zhu + + * mips-tedp.c (mips_register_name): Add comments. + 2010-12-23 Yao Qi * arm-tdep.c (thumb_analyze_prologue): Move some code ... diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 81f2d7de63c..e6df5f56a68 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 ""; -- 2.30.2