From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1569 invoked by alias); 19 Dec 2011 07:57:34 -0000 Received: (qmail 1559 invoked by uid 22791); 19 Dec 2011 07:57:33 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Dec 2011 07:57:20 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1RcY62-0002Yx-2p from Yao_Qi@mentor.com ; Sun, 18 Dec 2011 23:57:18 -0800 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sun, 18 Dec 2011 23:57:17 -0800 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.1.289.1; Sun, 18 Dec 2011 23:57:16 -0800 Message-ID: <4EEEEE57.90901@codesourcery.com> Date: Mon, 19 Dec 2011 08:13:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Joel Brobecker CC: Jan Kratochvil , Hui Zhu , gdb-patches ml Subject: Re: [obv] Fix unused-but-set-variable error [Re: [OB] Fix linux-low.c build error] References: <20111218192239.GA25401@host2.jankratochvil.net> <20111218205826.GA15385@host2.jankratochvil.net> <4EEED8FB.4040103@codesourcery.com> <20111219065002.GQ21915@adacore.com> In-Reply-To: <20111219065002.GQ21915@adacore.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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: 2011-12/txt/msg00625.txt.bz2 On 12/19/2011 02:50 PM, Joel Brobecker wrote: > Thanks! This begs the question, though: Why is it OK to ignore > the error? > > I am looking at the code and, not knowing much about tracepoints, I don't > understand well the prupose of gdb_ust_thread (hint: No function > description). As far as I can tell, the write is simply writing the byte > that was read from the connection back to it. What will happen if > we fail to write, and should the user be warned, for instance? > This native socket is used for synchronization between gdbserver and libinproctrace.so agent. gdbserver puts command into cmd_buf, writes one byte in socket to notify gdb_ust_thread (a dedicated thread) and wait. gdb_ust_thread picks up command from cmd_buf. When process is done, gdb_ust_thread writes one byte again to notify gdbserver and close socket. I don't think we have to do something w.r.t write failure. The description above is quite user-invisible, so a warning may confuse users to some extent, IMO. -- Yao (齐尧)