+static void
+maintenance_print_user_registers (const char *args, int from_tty)
+{
+ struct gdbarch *gdbarch = get_current_arch ();
+ struct gdb_user_regs *regs;
+ struct user_reg *reg;
+ int regnum;
+
+ regs = (struct gdb_user_regs *) gdbarch_data (gdbarch, user_regs_data);
+ regnum = gdbarch_num_cooked_regs (gdbarch);
+
+ fprintf_unfiltered (gdb_stdout, " %-11s %3s\n", "Name", "Nr");
+ for (reg = regs->first; reg != NULL; reg = reg->next, ++regnum)
+ fprintf_unfiltered (gdb_stdout, " %-11s %3d\n", reg->name, regnum);
+}