* win32-nat.c (psapi_module_handle): Remove static.
[deliverable/binutils-gdb.git] / gdb / infcmd.c
index 7f45cc7f7d4f1d6337bab4e212e4685237012553..e8ac46a8ac44bc22938b42728de4c98dd1cddc69 100644 (file)
@@ -47,6 +47,7 @@
 #include "gdb_assert.h"
 #include "observer.h"
 #include "target-descriptions.h"
+#include "user-regs.h"
 
 /* Functions exported for general use, in inferior.h: */
 
@@ -481,7 +482,7 @@ run_command_1 (char *args, int from_tty, int tbreak_at_main)
   /* Purge old solib objfiles. */
   objfile_purge_solibs ();
 
-  do_run_cleanups (NULL);
+  clear_solib ();
 
   /* The comment here used to read, "The exec file is re-read every
      time we do a generic_mourn_inferior, so we just have to worry
@@ -1705,21 +1706,35 @@ registers_info (char *addr_exp, int fpregs)
       while ((*addr_exp) != '\0' && !isspace ((*addr_exp)))
        addr_exp++;
       end = addr_exp;
-      
+
       /* Figure out what we've found and display it.  */
 
       /* A register name?  */
       {
-       int regnum = frame_map_name_to_regnum (frame,
-                                              start, end - start);
+       int regnum = frame_map_name_to_regnum (frame, start, end - start);
        if (regnum >= 0)
          {
-           gdbarch_print_registers_info (gdbarch, gdb_stdout,
-                                         frame, regnum, fpregs);
+           /* User registers lie completely outside of the range of
+              normal registers.  Catch them early so that the target
+              never sees them.  */
+           if (regnum >= gdbarch_num_regs (gdbarch)
+                         + gdbarch_num_pseudo_regs (gdbarch))
+             {
+               struct value *val = value_of_user_reg (regnum, frame);
+
+               printf_filtered ("%s: ", start);
+               print_scalar_formatted (value_contents (val),
+                                       check_typedef (value_type (val)),
+                                       'x', 0, gdb_stdout);
+               printf_filtered ("\n");
+             }
+           else
+             gdbarch_print_registers_info (gdbarch, gdb_stdout,
+                                           frame, regnum, fpregs);
            continue;
          }
       }
-       
+
       /* A register number?  (how portable is this one?).  */
       {
        char *endptr;
@@ -1872,11 +1887,7 @@ attach_command (char *args, int from_tty)
      (gdb) attach 4712
      Cannot access memory at address 0xdeadbeef
   */
-#ifdef CLEAR_SOLIB
-      CLEAR_SOLIB ();
-#else
-      clear_solib ();
-#endif
+  clear_solib ();
 
   target_attach (args, from_tty);
 
This page took 0.030091 seconds and 4 git commands to generate.