From 47e242eca46f01673f05ac0a6a6a8cf401e3b981 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 22 May 2003 15:46:20 +0000 Subject: [PATCH] 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. --- gdb/ChangeLog | 6 ++++++ gdb/infptrace.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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 */ -- 2.30.2