From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4003 invoked by alias); 17 Apr 2006 13:50:12 -0000 Received: (qmail 3994 invoked by uid 22791); 17 Apr 2006 13:50:12 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 17 Apr 2006 13:50:10 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k3HDnTrl027207; Mon, 17 Apr 2006 15:49:29 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6) with ESMTP id k3HDnTBQ003178; Mon, 17 Apr 2006 15:49:29 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6/Submit) id k3HDnTlG026394; Mon, 17 Apr 2006 15:49:29 +0200 (CEST) Date: Mon, 17 Apr 2006 13:50:00 -0000 Message-Id: <200604171349.k3HDnTlG026394@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: msnyder@redhat.com, gdb-patches@sourceware.org In-reply-to: <20060417133748.GA15525@nevyn.them.org> (message from Daniel Jacobowitz on Mon, 17 Apr 2006 09:37:48 -0400) Subject: Re: Save the length of inserted breakpoints References: <200603022301.k22N1qEt008208@elgar.sibelius.xs4all.nl> <20060411214613.GA702@nevyn.them.org> <200604120943.k3C9hYJ8012016@elgar.sibelius.xs4all.nl> <20060412125712.GA22145@nevyn.them.org> <200604121837.k3CIbMwu004466@elgar.sibelius.xs4all.nl> <20060412184717.GA29980@nevyn.them.org> <443EC947.9060109@redhat.com> <200604162349.k3GNnNhl006336@elgar.sibelius.xs4all.nl> <20060417014133.GA4169@nevyn.them.org> <200604171308.k3HD8qdY014104@elgar.sibelius.xs4all.nl> <20060417133748.GA15525@nevyn.them.org> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00217.txt.bz2 > Date: Mon, 17 Apr 2006 09:37:48 -0400 > From: Daniel Jacobowitz > > > I still think we should maintain a strict seperation between the > > high-level breakpoint code and the low-level target code. So I'd > > really appreciate it if you'd be willing to change your patch such > > that instead of struct bp_location, you used a different struct, which > > for now would have three members: the saved contents, the length and > > the address. It's perfectly ok with me to make that new struct part > > of struct bp_location to avoid all memory allocation problems. > > Sounds perfect! While the argument was a little wearing, I am entirely > happy with this result. I'll post a patch for this shortly. Sorry about that. I was a bit annoyed by some of the replies, and I guess me wanting to make a point here made my subsequent replies a bit unconstructive. > I've been thinking about having target methods which don't need the > shadow contents (there are definitely several) record the "length" of > the breakpoint as zero; then deprecated_read_memory_nobpt can do the > right thing. Does this sound reasonable? The alternative is to do an > unnecessary read from the target. Absolutely. If the length is zero there are no shadow contents to worry about. But it is probably better to address deprecated_read_memory_nobpt in a seperate patch. Mark