2010-12-27 Kevin Buettner <kevinb@redhat.com>
Hui Zhu <teawater@gmail.com> * mips-tedp.c (mips_register_name): Add comments.
This commit is contained in:
parent
a64718d3b1
commit
6229fbeaa6
|
@ -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>
|
2010-12-23 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
* arm-tdep.c (thumb_analyze_prologue): Move some code ...
|
* arm-tdep.c (thumb_analyze_prologue): Move some code ...
|
||||||
|
|
|
@ -454,7 +454,16 @@ mips_register_name (struct gdbarch *gdbarch, int regno)
|
||||||
enum mips_abi abi = mips_abi (gdbarch);
|
enum mips_abi abi = mips_abi (gdbarch);
|
||||||
|
|
||||||
/* Map [gdbarch_num_regs .. 2*gdbarch_num_regs) onto the raw registers,
|
/* 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);
|
int rawnum = regno % gdbarch_num_regs (gdbarch);
|
||||||
if (regno < gdbarch_num_regs (gdbarch))
|
if (regno < gdbarch_num_regs (gdbarch))
|
||||||
return "";
|
return "";
|
||||||
|
|
Loading…
Reference in New Issue