From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19654 invoked by alias); 4 Dec 2012 14:50:47 -0000 Received: (qmail 19612 invoked by uid 22791); 4 Dec 2012 14:50:45 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 04 Dec 2012 14:50:41 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 04 Dec 2012 06:50:41 -0800 X-ExtLoop1: 1 Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by orsmga002.jf.intel.com with ESMTP; 04 Dec 2012 06:50:39 -0800 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.95]) by IRSMSX103.ger.corp.intel.com ([169.254.3.74]) with mapi id 14.01.0355.002; Tue, 4 Dec 2012 14:50:07 +0000 From: "Metzger, Markus T" To: Pedro Alves CC: "gdb-patches@sourceware.org" , "markus.t.metzger@gmail.com" , "jan.kratochvil@redhat.com" , "tromey@redhat.com" , "kettenis@gnu.org" Subject: RE: [patch v4 09/13] gdbserver, btrace: add generic btrace support Date: Tue, 04 Dec 2012 14:50:00 -0000 Message-ID: References: <1354013351-14791-1-git-send-email-markus.t.metzger@intel.com> <1354013351-14791-10-git-send-email-markus.t.metzger@intel.com> <50B674CC.6050009@redhat.com> In-Reply-To: <50B674CC.6050009@redhat.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: 2012-12/txt/msg00062.txt.bz2 > -----Original Message----- > From: Pedro Alves [mailto:palves@redhat.com] > Sent: Wednesday, November 28, 2012 9:32 PM Thanks for your review. [...] > > + if (!thread->btrace) > > + fprintf (stderr, "Could not enable btrace for %s.\n", ptid_str= ); > > + else > > + err =3D 0; > > + } > > + > > + return err; >=20 > Instead of printing those errors to stderr, you can pass them > down to GDB, by sending "E.ERRTXT" instead of E01. (See > packet_check_result in remote.c). Thanks. This is much better in terms of error reporting. [...] > > + else if (offset >=3D cache.used_size) > > + { > > + buffer_free (&cache); > > + return 0; >=20 > I think this should be -1. Yes. I removed the =3D=3D case. When offset equals the cache size, we retur= n 0. [...] Thanks, Markus. Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052