From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19717 invoked by alias); 20 Dec 2013 13:37:45 -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 19705 invoked by uid 89); 20 Dec 2013 13:37:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mga09.intel.com Received: from mga09.intel.com (HELO mga09.intel.com) (134.134.136.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Dec 2013 13:37:44 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 20 Dec 2013 05:33:53 -0800 X-ExtLoop1: 1 Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga001.jf.intel.com with ESMTP; 20 Dec 2013 05:37:41 -0800 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.135]) by IRSMSX101.ger.corp.intel.com ([163.33.3.153]) with mapi id 14.03.0123.003; Fri, 20 Dec 2013 13:36:58 +0000 From: "Metzger, Markus T" To: Pedro Alves CC: "jan.kratochvil@redhat.com" , "gdb-patches@sourceware.org" Subject: RE: [PATCH v9 21/29] record-btrace: provide xfer_partial target method Date: Fri, 20 Dec 2013 13:37:00 -0000 Message-ID: References: <1387471499-29444-1-git-send-email-markus.t.metzger@intel.com> <1387471499-29444-22-git-send-email-markus.t.metzger@intel.com> <52B34555.8040200@redhat.com> In-Reply-To: <52B34555.8040200@redhat.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00832.txt.bz2 > -----Original Message----- > From: Pedro Alves [mailto:palves@redhat.com] > Sent: Thursday, December 19, 2013 8:13 PM > To: Metzger, Markus T > Cc: jan.kratochvil@redhat.com; gdb-patches@sourceware.org > Subject: Re: [PATCH v9 21/29] record-btrace: provide xfer_partial target > method >=20 > On 12/19/2013 04:44 PM, Markus Metzger wrote: > > + > > + /* We do not allow writing memory in general. */ > > + if (writebuf !=3D NULL) > > + throw_error (NOT_AVAILABLE_ERROR, > > + _("This record target does not record memory.")); >=20 > So printing globals errors out? >=20 > I thought you were going to return TARGET_XFER_E_UNAVAILABLE > anyway? Did you try making raw_memory_xfer_partial return > immediately if ops->to_xfer_partial returns TARGET_XFER_E_UNAVAILABLE, > instead of proceeding to query the target beneath? I thought you were OK with the error. Here's our discussion: >>>> I now get an error when trying to access a variable with static storage >>>> duration or when trying to access memory directly via its address. >>>> It would be nice to also get an in those cases. This wo= uld >>>> require the respective layer to catch my exception. >>> >>> Please try returning TARGET_XFER_E_UNAVAILABLE instead. >>=20 >> That is ignored just like the -1 I returned earlier. I nevertheless cha= nged >> the default return to that since it is more descriptive. > >Thanks. Hmm, yes, looks like raw_memory_xfer_partial carries on >looking at the target beneath, and then when that fails, we'll >lose TARGET_XFER_E_UNAVAILABLE, and return TARGET_XFER_E_IO/-1, >losing the better TARGET_XFER_E_UNAVAILABLE. I can try to make raw_memorx_xfer_partial return on TARGET_XFER_E_UNAVAILABLE. This will be more intrusive, though. Regards, 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