OSDN Git Service

2003-05-22 Jeff Johnston <jjohnstn@redhat.com>
authorJeff Johnston <jjohnstn@redhat.com>
Thu, 22 May 2003 15:46:20 +0000 (15:46 +0000)
committerJeff Johnston <jjohnstn@redhat.com>
Thu, 22 May 2003 15:46:20 +0000 (15:46 +0000)
        * infptrace.c (detach): Call print_sys_errmsg rather than
        perror_with_name to issue warning message when errno is non-zero
        after calling ptrace detach.

gdb/ChangeLog
gdb/infptrace.c

index f05acf1..14911d0 100644 (file)
@@ -1,3 +1,9 @@
+2003-05-22  Jeff Johnston  <jjohnstn@redhat.com>
+
+       * infptrace.c (detach): Call print_sys_errmsg rather than
+       perror_with_name to issue warning message when errno is non-zero
+       after calling ptrace detach.
+
 2003-05-21  J. Brobecker  <brobecker@gnat.com>
 
        * config/pa/tm-hppa.h: Delete some unused macros. Move some
index 1225dd8..6147cbe 100644 (file)
@@ -301,8 +301,8 @@ detach (int signal)
   errno = 0;
   ptrace (PT_DETACH, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) 1,
           signal);
-  if (errno && errno != ESRCH)
-    perror_with_name ("ptrace");
+  if (errno)
+    print_sys_errmsg ("ptrace", errno);
   attach_flag = 0;
 }
 #endif /* ATTACH_DETACH */