* configure.ac: Use AC_CHECK_DECLS instead of gcc_AC_CHECK_DECLS
[deliverable/binutils-gdb.git] / gdb / remote.c
index 108b5e882041698ed7fd1ca14165d98f7e018731..4cd4c449b90a46cb122ea8bd03cc775e3dc47b23 100644 (file)
@@ -83,8 +83,6 @@ static void remote_resume (ptid_t ptid, int step,
                            enum target_signal siggnal);
 static void remote_async_resume (ptid_t ptid, int step,
                                 enum target_signal siggnal);
-static int remote_start_remote (struct ui_out *uiout, void *dummy);
-
 static void remote_open (char *name, int from_tty);
 static void remote_async_open (char *name, int from_tty);
 
@@ -2019,7 +2017,7 @@ remote_start_remote_dummy (struct ui_out *uiout, void *dummy)
   return 1;
 }
 
-static int
+static void
 remote_start_remote (struct ui_out *uiout, void *dummy)
 {
   immediate_quit++;            /* Allow user to interrupt it.  */
@@ -2037,9 +2035,7 @@ remote_start_remote (struct ui_out *uiout, void *dummy)
   putpkt ("?");                        /* Initiate a query from remote machine.  */
   immediate_quit--;
 
-  /* NOTE: See comment above in remote_start_remote_dummy().  This
-     function returns something >=0.  */
-  return remote_start_remote_dummy (uiout, dummy);
+  remote_start_remote_dummy (uiout, dummy);
 }
 
 /* Open a connection to a remote debugger.
@@ -2157,7 +2153,7 @@ static void
 remote_open_1 (char *name, int from_tty, struct target_ops *target,
               int extended_p, int async_p)
 {
-  int ex;
+  struct exception ex;
   struct remote_state *rs = get_remote_state ();
   if (name == 0)
     error ("To open a remote debug connection, you need to specify what\n"
@@ -2260,17 +2256,13 @@ remote_open_1 (char *name, int from_tty, struct target_ops *target,
      been fixed - the function set_cmd_context() makes it possible for
      all the ``target ....'' commands to share a common callback
      function.  See cli-dump.c.  */
-  ex = catch_exceptions (uiout,
-                        remote_start_remote, NULL,
-                        "Couldn't establish connection to remote"
-                        " target\n",
-                        RETURN_MASK_ALL);
-  if (ex < 0)
+  ex = catch_exception (uiout, remote_start_remote, NULL, RETURN_MASK_ALL);
+  if (ex.reason < 0)
     {
       pop_target ();
       if (async_p)
        wait_forever_enabled_p = 1;
-      throw_reason (ex);
+      throw_exception (ex);
     }
 
   if (async_p)
@@ -2738,7 +2730,7 @@ interrupt_query (void)
 Give up (and stop debugging it)? "))
     {
       target_mourn_inferior ();
-      throw_reason (RETURN_QUIT);
+      deprecated_throw_reason (RETURN_QUIT);
     }
 
   target_terminal_inferior ();
This page took 0.029524 seconds and 4 git commands to generate.