From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32472 invoked by alias); 28 Mar 2013 22:38:42 -0000 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 Received: (qmail 32454 invoked by uid 89); 28 Mar 2013 22:38:32 -0000 X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE autolearn=ham version=3.3.1 Received: from mail-wi0-f175.google.com (HELO mail-wi0-f175.google.com) (209.85.212.175) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 28 Mar 2013 22:38:30 +0000 Received: by mail-wi0-f175.google.com with SMTP id c10so3770957wiw.14 for ; Thu, 28 Mar 2013 15:38:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-originating-ip:in-reply-to:references :from:date:message-id:subject:to:cc:content-type:x-gm-message-state; bh=eukoZhjoDJ7tj86hyI65F0oordL63IKcNtVKekJVSDk=; b=T38nqSo2HFaYBkqXxTL8Uo771AsgLMp+U+HXUnVtufTltJL5hZUxagDsGKjcFrkMyI fyFvLl/o2lujC9gr1l0Ay3rFEDjv+HrLQjRNM9wjEjecOffcmZlQjkh/XV0ONdCBqx5A G6WDz5kYnlnM+9W93AbccOmUXoxK19cny+ERGxlLmXKOBEd5e0b0ISQkpaBZdE4cFKzv kDwMDIJuzuolBqFeg1CVwrj9F/LbGwZdtG7R6hD8csEguswAsliPe3MVIDBoeZhK4BFv kD+veBTPR++p5R6jzDZ6X3ELtjhOb2uyhSQfqH1ddhy5fGvmuzKY9W/ey6stGeG0RV+C d/uA== X-Received: by 10.194.63.109 with SMTP id f13mr501573wjs.11.1364510307744; Thu, 28 Mar 2013 15:38:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.153.196 with HTTP; Thu, 28 Mar 2013 15:38:07 -0700 (PDT) In-Reply-To: <515478BE.3030801@redhat.com> References: <20130325195832.GA15218@host2.jankratochvil.net> <515478BE.3030801@redhat.com> From: Gareth McMullin Date: Fri, 29 Mar 2013 00:44:00 -0000 Message-ID: Subject: Re: Include putpkt in TRY_CATCH. PR gdb/15275 To: Pedro Alves Cc: Jan Kratochvil , gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQlSq146aLKBYP9T9ny3Hfph2b1UZHFUkJJt4XKlDGrN3WT5xRGcQTbn1ibg2rsifCElNt6v X-SW-Source: 2013-03/txt/msg01083.txt.bz2 On Thu, Mar 28, 2013 at 10:07 AM, Pedro Alves wrote: > So, per Gareth's analysis, with tcp, where this is not reproducible, > we don't error out on sends, but instead detect the error on the > subsequent readchar. When that read fails, we throw the target away, > and throw TARGET_CLOSE_ERROR. He was suggesting making ser-unix.c > fake success too on failed writes, so we'd get to readchar detecting > the error on serial ports too. But, why not let the error > propagate out of serial_write, and catch it at the remote level > instead of delaying the inevitable? IOW, throw away the target > if writing fails too. I like this approach, it is a better solution. Thank you. Gareth