From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21962 invoked by alias); 13 Jan 2014 12:36:46 -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 21953 invoked by uid 89); 13 Jan 2014 12:36:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mga11.intel.com Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 13 Jan 2014 12:36:44 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 13 Jan 2014 04:36:42 -0800 X-ExtLoop1: 1 Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga002.fm.intel.com with ESMTP; 13 Jan 2014 04:36:16 -0800 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.135]) by IRSMSX102.ger.corp.intel.com ([169.254.2.114]) with mapi id 14.03.0123.003; Mon, 13 Jan 2014 12:36:11 +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: Mon, 13 Jan 2014 12:36: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> <52B4688E.2090603@redhat.com> In-Reply-To: <52B4688E.2090603@redhat.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00314.txt.bz2 > -----Original Message----- > From: Pedro Alves [mailto:palves@redhat.com] > Sent: Friday, December 20, 2013 4:56 PM > Can you show the patchlet you did, and the before/after gdb > output though? I'd be better to see that, and have any possible > follow up discussion discussion here now, rather than fractured > to a potential repost of the series. Here's the current version of the function: static LONGEST record_btrace_xfer_partial (struct target_ops *ops, enum target_object obje= ct, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len) { struct target_ops *t; /* Filter out requests that don't make sense during replay. */ if (!record_btrace_allow_memory_access && record_btrace_is_replaying ()) { switch (object) { case TARGET_OBJECT_MEMORY: { struct target_section *section; /* We do not allow writing memory in general. */ if (writebuf !=3D NULL) return TARGET_XFER_E_UNAVAILABLE; /* We allow reading readonly memory. */ section =3D target_section_by_addr (ops, offset); if (section !=3D NULL) { /* Check if the section we found is readonly. */ if ((bfd_get_section_flags (section->the_bfd_section->owner, section->the_bfd_section) & SEC_READONLY) !=3D 0) { /* Truncate the request to fit into this section. */ len =3D min (len, section->endaddr - offset); break; } } return TARGET_XFER_E_UNAVAILABLE; } } } /* Forward the request. */ for (ops =3D ops->beneath; ops !=3D NULL; ops =3D ops->beneath) if (ops->to_xfer_partial !=3D NULL) return ops->to_xfer_partial (ops, object, annex, readbuf, writebuf, offset, len); return TARGET_XFER_E_UNAVAILABLE; } And here's the new GDB output: (gdb) print glob Memory at address 0x601030 unavailable. This used to be: (gdb) print glob This record target does not record memory. 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