From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1622 invoked by alias); 4 Aug 2008 19:55:18 -0000 Received: (qmail 1610 invoked by uid 22791); 4 Aug 2008 19:55:18 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 04 Aug 2008 19:54:37 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 455FC983EF; Mon, 4 Aug 2008 19:54:35 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 2F21F9839F; Mon, 4 Aug 2008 19:54:35 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KQ68Y-0007bd-Fr; Mon, 04 Aug 2008 15:54:34 -0400 Date: Mon, 04 Aug 2008 19:55:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [gdbserver] Problems trying to resume dead threads Message-ID: <20080804195434.GA28917@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , gdb-patches@sourceware.org References: <20080804182930.GA23825@caradoc.them.org> <200808041945.m74Jjkcf028811@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200808041945.m74Jjkcf028811@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00065.txt.bz2 On Mon, Aug 04, 2008 at 09:45:46PM +0200, Ulrich Weigand wrote: > It seems the "read" errors are just artifacts: because of the first > error (on writing the register), the "error" call performs a longjmp > to the toplevel, which leaves things in a somewhat strange state. > > The only "real" errors I see (in addition to the one in > linux_resume_one_process) are the cases in regsets_store_inferior_registers > (which is already a warning) and usr_store_inferior_registers (which > is not). > > In any case, I don't think these should be even warnings for ESRCH: > showing a warning in a situation that is completely normal and in > fact handled correctly would just confuse users IMO. > > I'd propose to just silently ignore ESRCH errors while writing registers > (in addition to your patch). What do you think? I think that's acceptable, though not ideal. ESRCH can mean "the program is gone", or for ptrace it can mean "the program is not stopped". So there are a class of bugs in gdbserver which can lead to the ESRCH error path. But distinguishing them from this case is quite difficult. -- Daniel Jacobowitz CodeSourcery