Constify get_exec_file
[deliverable/binutils-gdb.git] / gdb / windows-nat.c
index df44994c95a8fcf5d94bc6e3be531becca431496..10d5c95d091d02a1e50406b186c5e48864911528 100644 (file)
@@ -147,7 +147,7 @@ static GetConsoleFontSize_ftype *GetConsoleFontSize;
 static int have_saved_context; /* True if we've saved context from a
                                   cygwin signal.  */
 #ifdef __CYGWIN__
-static CONTEXT saved_context;  /* Containes the saved context from a
+static CONTEXT saved_context;  /* Contains the saved context from a
                                   cygwin signal.  */
 #endif
 
@@ -518,7 +518,7 @@ windows_delete_thread (ptid_t ptid, DWORD exit_code, bool main_thread_p)
 
      Note that no notification was printed when the main thread
      was created, and thus, unless in verbose mode, we should be
-     symetrical, and avoid that notification for the main thread
+     symmetrical, and avoid that notification for the main thread
      here as well.  */
 
   if (info_verbose)
@@ -1447,8 +1447,8 @@ windows_nat_target::resume (ptid_t ptid, int step, enum gdb_signal sig)
 
   last_sig = GDB_SIGNAL_0;
 
-  DEBUG_EXEC (("gdb: windows_resume (pid=%d, tid=%ld, step=%d, sig=%d);\n",
-              ptid.pid (), ptid.tid (), step, sig));
+  DEBUG_EXEC (("gdb: windows_resume (pid=%d, tid=0x%x, step=%d, sig=%d);\n",
+              ptid.pid (), (unsigned) ptid.tid (), step, sig));
 
   /* Get context for currently selected thread.  */
   th = thread_rec (inferior_ptid.tid (), FALSE);
@@ -1983,13 +1983,14 @@ windows_nat_target::attach (const char *args, int from_tty)
 #endif
 
   if (!ok)
-    error (_("Can't attach to process."));
+    error (_("Can't attach to process %u (error %u)"),
+          (unsigned) pid, (unsigned) GetLastError ());
 
   DebugSetProcessKillOnExit (FALSE);
 
   if (from_tty)
     {
-      char *exec_file = (char *) get_exec_file (0);
+      const char *exec_file = get_exec_file (0);
 
       if (exec_file)
        printf_unfiltered ("Attaching to program `%s', %s\n", exec_file,
@@ -2709,7 +2710,7 @@ windows_nat_target::create_inferior (const char *exec_file,
        redirect_inferior_handles (allargs, allargs_copy,
                                   &fd_inp, &fd_out, &fd_err);
       if (errno)
-       warning (_("Error in redirection: %s."), strerror (errno));
+       warning (_("Error in redirection: %s."), safe_strerror (errno));
       else
        errno = e;
       allargs_len = strlen (allargs_copy);
This page took 0.024941 seconds and 4 git commands to generate.