From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4209 invoked by alias); 13 Dec 2007 17:57:12 -0000 Received: (qmail 4199 invoked by uid 22791); 13 Dec 2007 17:57:11 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 13 Dec 2007 17:57:00 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1J2sDx-0002iP-N3 for gdb-patches@sources.redhat.com; Thu, 13 Dec 2007 17:51:53 +0000 Received: from 77.246.241.246 ([77.246.241.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Dec 2007 17:51:53 +0000 Received: from ghost by 77.246.241.246 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Dec 2007 17:51:53 +0000 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: [RFA] Ignore breakpoints when reading memory. Date: Thu, 13 Dec 2007 19:23:00 -0000 Message-ID: References: <200712011419.45773.vladimir@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.4 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: 2007-12/txt/msg00176.txt.bz2 Jim Blandy wrote: > > Daniel Jacobowitz writes: >> On Sat, Dec 01, 2007 at 02:19:45PM +0300, Vladimir Prus wrote: >>> >>> This commit prepares us for always-inserted-breakpoints mode. >>> If breakpoints are always inserted, then reading the code memory >>> will read the breakpoint instructions, not the original content. >>> This patch makes us try to restore the original comments using >>> the breakpoints table. OK? >> >> Doesn't this make the extra call in read_memory_nobpt redundant? >> >> Are there any sites that need to see the breakpoint? For instance, >> look at ppc_linux_memory_remove_breakpoint. > > The code I'm presently working on would like to see breakpoints, to my > surprise. Hmm, why? I see two solutions: 1. Add new parameter to target_xfer_partial, telling whether breakpoint content should be shown or restored. Pass that parameter whenever we need to see breakpoints. That would need quite a bit of churn everywhere. 2. Don't touch memory_xfer_partial at all. Audit all places where code memory is accessed, and call restore_breakpoint_shadows explicitly. Lots of work, likewise, but also eliminates the performance concerns. Comments? - Volodya