aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-06-13 17:25:16 +0000
committerDaniel Jacobowitz <drow@false.org>2007-06-13 17:25:16 +0000
commit0cc93a06b3ed13ecf7962515b8af93654874a303 (patch)
tree7237f49ae92e861360ead457345fb4fbc946f5cd /gdb
parent67f3407ffbf8f43d93f0c9b2d7e26e767ca5fb53 (diff)
downloadgdb-0cc93a06b3ed13ecf7962515b8af93654874a303.zip
gdb-0cc93a06b3ed13ecf7962515b8af93654874a303.tar.gz
gdb-0cc93a06b3ed13ecf7962515b8af93654874a303.tar.bz2
* mips-tdep.c (mips_print_register): Remove unused ALL argument.
(print_gp_register_row): Stop before printing a register bigger than the ABI register size. (mips_print_registers_info): Update call to mips_print_register.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/mips-tdep.c20
2 files changed, 25 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0b9d3bf..52d6181 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
+ * mips-tdep.c (mips_print_register): Remove unused ALL argument.
+ (print_gp_register_row): Stop before printing a register bigger
+ than the ABI register size.
+ (mips_print_registers_info): Update call to mips_print_register.
+
+2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
+
* expression.h (enum exp_opcode): Document a register name for
OP_REGISTER.
* parse.c (write_dollar_variable): Write the register name for
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index db1c198..63e4eea 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -3956,7 +3956,7 @@ mips_print_fp_register (struct ui_file *file, struct frame_info *frame,
static void
mips_print_register (struct ui_file *file, struct frame_info *frame,
- int regnum, int all)
+ int regnum)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
gdb_byte raw_buffer[MAX_REGISTER_SIZE];
@@ -4037,6 +4037,18 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame,
if (TYPE_CODE (register_type (gdbarch, regnum)) ==
TYPE_CODE_FLT)
break; /* end the row: reached FP register */
+ /* Large registers are handled separately. */
+ if (register_size (current_gdbarch, regnum)
+ > mips_abi_regsize (current_gdbarch))
+ {
+ if (col > 0)
+ break; /* End the row before this register. */
+
+ /* Print this register on a row by itself. */
+ mips_print_register (file, frame, regnum);
+ fprintf_filtered (file, "\n");
+ return regnum + 1;
+ }
if (col == 0)
fprintf_filtered (file, " ");
fprintf_filtered (file,
@@ -4066,6 +4078,10 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame,
if (TYPE_CODE (register_type (gdbarch, regnum)) ==
TYPE_CODE_FLT)
break; /* end row: reached FP register */
+ if (register_size (current_gdbarch, regnum)
+ > mips_abi_regsize (current_gdbarch))
+ break; /* End row: large register. */
+
/* OK: get the data in raw format. */
if (!frame_register_read (frame, regnum, raw_buffer))
error (_("can't read register %d (%s)"),
@@ -4107,7 +4123,7 @@ mips_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
if (*(gdbarch_register_name (current_gdbarch, regnum)) == '\0')
error (_("Not a valid register for the current processor type"));
- mips_print_register (file, frame, regnum, 0);
+ mips_print_register (file, frame, regnum);
fprintf_filtered (file, "\n");
}
else