From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6021 invoked by alias); 16 Dec 2013 19:16:31 -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 6008 invoked by uid 89); 16 Dec 2013 19:16:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Dec 2013 19:16:30 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBGJGQTB001631 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 16 Dec 2013 14:16:27 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rBGJGOhY021267; Mon, 16 Dec 2013 14:16:25 -0500 Message-ID: <52AF5188.9040800@redhat.com> Date: Mon, 16 Dec 2013 19:16:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: "Metzger, Markus T" CC: "jan.kratochvil@redhat.com" , "gdb-patches@sourceware.org" Subject: Re: [patch v8 17/24] record-btrace: provide xfer_partial target method References: <1386839747-8860-1-git-send-email-markus.t.metzger@intel.com> <1386839747-8860-18-git-send-email-markus.t.metzger@intel.com> <52AB555A.3070301@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-12/txt/msg00598.txt.bz2 On 12/16/2013 10:53 AM, Metzger, Markus T wrote: >> -----Original Message----- >> From: Pedro Alves [mailto:palves@redhat.com] >> Sent: Friday, December 13, 2013 7:44 PM > > >> I must be missing something, but won't raw_memory_xfer_partial >> keep trying in the target beneath, anyway? > > You're right. This function did not have any effect - and that was good; > at least to some extent. Thanks for pointing this out! > > I changed the return -1 to throw_error (...) and added a check for > writebuf != NULL. Suddenly I got tons of errors when GDB can't insert > breakpoints any longer for (reverse-)stepping. This is why precord keeps track of breakpoints itself too: /* Behavior is conditional on RECORD_FULL_IS_REPLAY. We will not actually insert or remove breakpoints in the real target when replaying, nor when recording. */ static int record_full_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) { > Also stepping gets broken. I can't immediately why that would be. > > I still get the nice for function parameters. This fails > already when trying to access the SP for computing the CFA. > > 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 would > require the respective layer to catch my exception. Please try returning TARGET_XFER_E_UNAVAILABLE instead. For traceframes what we do is GDB knows what memory is available or isn't available before requesting it, through traceframe_available_memory. See also: https://sourceware.org/ml/gdb-patches/2013-10/msg00761.html (the discussion continued a little in the following month) > To avoid those errors when trying to set breakpoints, I could try > providing to_insert_breakpoint and to_remove_breakpoint methods > and maintain my own breakpoints. Right. > Breakpoint conditions would still fail. Not sure what else I'm missing. -- Pedro Alves