Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: "J. Johnston" <jjohnstn@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: RFA: patch to infptrace.c
Date: Wed, 21 May 2003 22:46:00 -0000	[thread overview]
Message-ID: <1030521224635.ZM475@localhost.localdomain> (raw)
In-Reply-To: "J. Johnston" <jjohnstn@redhat.com> "RFA: patch to infptrace.c" (May 21,  6:31pm)

On May 21,  6:31pm, J. Johnston wrote:

> The attached patch changes the ptrace detach call to not perform error handling
> when an error occurs in detach.  Without this patch, an error in detach stops gdb
> from exiting.  The error keeps returning to the command line over and over again.
> 
> I thought I had fixed this earlier by adding a check for errno != ESRCH, but it
> appears there are other scenarios that may occur.

Which other errno values are tripping it up?

Assuming that it's a good idea to emit only a warning, do we still need
the errno != ESRCH check?

> Ok to commit?
> 
> -- Jeff J.
> 
> 2003-05-21  Jeff Johnston  <jjohnstn@redhat.com>
> 
> 	* infptrace.c (detach): Call print_sys_errmsg when an error occurs
> 	instead of perror_with_name.
> 
> [ text/plain ] :
> 
> Index: infptrace.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/infptrace.c,v
> retrieving revision 1.25
> diff -u -p -r1.25 infptrace.c
> --- infptrace.c	8 May 2003 20:52:47 -0000	1.25
> +++ infptrace.c	21 May 2003 21:39:56 -0000
> @@ -302,7 +302,7 @@ detach (int signal)
>    ptrace (PT_DETACH, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) 1,
>            signal);
>    if (errno && errno != ESRCH)
> -    perror_with_name ("ptrace");
> +    print_sys_errmsg ("ptrace", errno);
>    attach_flag = 0;
>  }
>  #endif /* ATTACH_DETACH */


  reply	other threads:[~2003-05-21 22:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-21 22:31 J. Johnston
2003-05-21 22:46 ` Kevin Buettner [this message]
2003-05-21 23:11   ` J. Johnston
2003-05-21 23:36     ` Kevin Buettner
2003-05-22 15:52       ` J. Johnston

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1030521224635.ZM475@localhost.localdomain \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jjohnstn@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox