2002-02-05 Daniel Jacobowitz <drow@mvista.com>
authorDaniel Jacobowitz <drow@false.org>
Tue, 5 Feb 2002 18:49:55 +0000 (18:49 +0000)
committerDaniel Jacobowitz <drow@false.org>
Tue, 5 Feb 2002 18:49:55 +0000 (18:49 +0000)
        * gdbserver/linux-low.c (create_inferior): Call strerror instead of
        grubbing through sys_errlist.

gdb/ChangeLog
gdb/gdbserver/linux-low.c

index 7ba37278977999dae847aad2a88fe870eb08c0c3..b3a4b72e701c1881085859e41a99bb8432b1e5bb 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-05  Daniel Jacobowitz  <drow@mvista.com>
+
+       * gdbserver/linux-low.c (create_inferior): Call strerror instead of
+       grubbing through sys_errlist.
+
 2002-02-05  Daniel Jacobowitz  <drow@mvista.com>
 
        * gdbserver/linux-low.c: New file, copied exactly from low-linux.c.
index 726e276540dbd09532ba0f5ecaac6d6e4e70ea66..e785aebdbc170c1bdf615fb9974f329879417120 100644 (file)
@@ -32,6 +32,7 @@
 #include <signal.h>
 #include <sys/ioctl.h>
 #include <fcntl.h>
+#include <string.h>
 
 /***************Begin MY defs*********************/
 static char my_registers[REGISTER_BYTES];
@@ -70,7 +71,7 @@ create_inferior (char *program, char **allargs)
       execv (program, allargs);
 
       fprintf (stderr, "Cannot exec %s: %s.\n", program,
-              errno < sys_nerr ? sys_errlist[errno] : "unknown error");
+              strerror (errno));
       fflush (stderr);
       _exit (0177);
     }