* dwarf2.c (struct line_head) [total_length]: Change type to
[binutils-gdb.git] / gdb / infcmd.c
index 030946495d12f565cf553fe5b3131022e24096cb..67c57d0373ba5c899a243ed71396122233a6e218 100644 (file)
@@ -36,6 +36,7 @@
 #include "language.h"
 #include "symfile.h"
 #include "objfiles.h"
+#include "completer.h"
 #ifdef UI_OUT
 #include "ui-out.h"
 #endif
@@ -893,7 +894,7 @@ run_stack_dummy (CORE_ADDR addr, char *buffer)
       bpt = set_momentary_breakpoint (sal,
                                      get_current_frame (),
                                      bp_call_dummy);
-      bpt->disposition = del;
+      bpt->disposition = disp_del;
 
       /* If all error()s out of proceed ended up calling normal_stop (and
          perhaps they should; it already does in the special case of error
@@ -1022,7 +1023,7 @@ until_command (char *arg, int from_tty)
 static void
 print_return_value (int structure_return, struct type *value_type)
 {
-  register value_ptr value;
+  struct value *value;
 #ifdef UI_OUT
   static struct ui_stream *stb = NULL;
 #endif /* UI_OUT */
@@ -1467,12 +1468,11 @@ do_registers_info (int regnum, int fpregs)
 {
   register int i;
   int numregs = NUM_REGS + NUM_PSEUDO_REGS;
+  char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
+  char *virtual_buffer = (char*) alloca (MAX_REGISTER_VIRTUAL_SIZE);
 
   for (i = 0; i < numregs; i++)
     {
-      char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
-      char *virtual_buffer = (char*) alloca (MAX_REGISTER_VIRTUAL_SIZE);
-
       /* Decide between printing all regs, nonfloat regs, or specific reg.  */
       if (regnum == -1)
        {
@@ -1534,18 +1534,6 @@ do_registers_info (int regnum, int fpregs)
            }
          printf_filtered (")");
        }
-
-/* FIXME!  val_print probably can handle all of these cases now...  */
-
-      /* Else if virtual format is too long for printf,
-         print in hex a byte at a time.  */
-      else if (REGISTER_VIRTUAL_SIZE (i) > (int) sizeof (long))
-       {
-         register int j;
-         printf_filtered ("0x");
-         for (j = 0; j < REGISTER_VIRTUAL_SIZE (i); j++)
-           printf_filtered ("%02x", (unsigned char) virtual_buffer[j]);
-       }
       /* Else print as integer in hex and in decimal.  */
       else
        {
@@ -1645,10 +1633,6 @@ nofp_registers_info (char *addr_exp, int from_tty)
 void
 attach_command (char *args, int from_tty)
 {
-#ifdef SOLIB_ADD
-  extern int auto_solib_add;
-#endif
-
   char *exec_file;
   char *full_exec_path = NULL;
 
@@ -1710,12 +1694,9 @@ attach_command (char *args, int from_tty)
     }
 
 #ifdef SOLIB_ADD
-  if (auto_solib_add)
-    {
-      /* Add shared library symbols from the newly attached process, if any.  */
-      SOLIB_ADD ((char *) 0, from_tty, &current_target);
-      re_enable_breakpoints_in_shlibs ();
-    }
+  /* Add shared library symbols from the newly attached process, if any.  */
+  SOLIB_ADD ((char *) 0, from_tty, &current_target, auto_solib_add);
+  re_enable_breakpoints_in_shlibs ();
 #endif
 
   /* Take any necessary post-attaching actions for this platform.
@@ -1795,8 +1776,8 @@ _initialize_infcmd (void)
 {
   struct cmd_list_element *c;
 
-  c= add_com ("tty", class_run, tty_command,
-             "Set terminal for future runs of program being debugged.");
+  c = add_com ("tty", class_run, tty_command,
+              "Set terminal for future runs of program being debugged.");
   c->completer = filename_completer;
 
   c = add_set_cmd ("args", class_run, var_string_noescape,
@@ -1900,25 +1881,30 @@ Argument N means do this N times (or till program stops for another reason).");
 Argument N means do this N times (or till program stops for another reason).");
   add_com_alias ("s", "step", class_run, 1);
 
-  add_com ("until", class_run, until_command,
-          "Execute until the program reaches a source line greater than the current\n\
+  c = add_com ("until", class_run, until_command,
+              "Execute until the program reaches a source line greater than the current\n\
 or a specified line or address or function (same args as break command).\n\
 Execution will also stop upon exit from the current stack frame.");
+  c->completer = location_completer;
   add_com_alias ("u", "until", class_run, 1);
 
-  add_com ("jump", class_run, jump_command,
-          "Continue program being debugged at specified line or address.\n\
+  c = add_com ("jump", class_run, jump_command,
+              "Continue program being debugged at specified line or address.\n\
 Give as argument either LINENUM or *ADDR, where ADDR is an expression\n\
 for an address to start at.");
+  c->completer = location_completer;
 
   if (xdb_commands)
-    add_com ("go", class_run, go_command,
-            "Usage: go <location>\n\
+    {
+      c = add_com ("go", class_run, go_command,
+                  "Usage: go <location>\n\
 Continue program being debugged, stopping at specified line or \n\
 address.\n\
 Give as argument either LINENUM or *ADDR, where ADDR is an \n\
 expression for an address to start at.\n\
 This command is a combination of tbreak and jump.");
+      c->completer = location_completer;
+    }
 
   if (xdb_commands)
     add_com_alias ("g", "go", class_run, 1);