From: Jeff Johnston Date: Thu, 22 May 2003 15:46:20 +0000 (+0000) Subject: 2003-05-22 Jeff Johnston X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=47e242eca46f01673f05ac0a6a6a8cf401e3b981;p=binutils-gdb.git 2003-05-22 Jeff Johnston * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f05acf16b83..14911d01928 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2003-05-22 Jeff Johnston + + * 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 * config/pa/tm-hppa.h: Delete some unused macros. Move some diff --git a/gdb/infptrace.c b/gdb/infptrace.c index 1225dd8a62c..6147cbe8964 100644 --- a/gdb/infptrace.c +++ b/gdb/infptrace.c @@ -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 */