From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3547 invoked by alias); 22 Nov 2008 06:38:40 -0000 Received: (qmail 3511 invoked by uid 22791); 22 Nov 2008 06:38:39 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 22 Nov 2008 06:38:04 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 3365B2A9627; Sat, 22 Nov 2008 01:38:02 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id dALOHVTF+Hjw; Sat, 22 Nov 2008 01:38:02 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id EE65A2A9620; Sat, 22 Nov 2008 01:38:01 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 99990E7ACD; Fri, 21 Nov 2008 22:37:59 -0800 (PST) Date: Sat, 22 Nov 2008 18:35:00 -0000 From: Joel Brobecker To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [patch] ia64: Fix breakpoints memory shadow Message-ID: <20081122063759.GE4318@adacore.com> References: <20081028172816.GA1284@host0.dyn.jankratochvil.net> <20081029210242.GA3635@adacore.com> <20081030144841.GA26606@host0.dyn.jankratochvil.net> <20081101185410.GB15606@adacore.com> <20081111131726.GA3272@host0.dyn.jankratochvil.net> <20081113053100.GL5112@adacore.com> <20081120144936.GA25926@host0.dyn.jankratochvil.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081120144936.GA25926@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.4.2.2i 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: 2008-11/txt/msg00604.txt.bz2 > gdb/doc/ > 2008-11-20 Jan Kratochvil > > * gdbint.texinfo (Target Conditionals): Extend the > gdbarch_breakpoint_from_pc description. This part needs to be reviewed by Eli. > One can reproduce it more easily by simple `b *0': > echo 'int main (void) { return 0; }' >mainx.c; gcc -o mainx mainx.c -Wall -ggdb2; ./gdb -nx -ex start -ex 'b *0' ./mainx Ah, yes - if you place a breakpoint at an invalid address (whether it was invalid right from the start as in your case, or if it became invalid later on)... > > I would have just said that we need to be able to read the original memory > > location to produce the breakpoint sequence. > > It currently depends on `set breakpoint always-inserted'. In the > default mode it broke the testsuite. Found `return NULL' as a minimal > regression-free solution. Right. I wasn't questioning the code, I just wasn't sure about the comment. > + /* It may be currently unreachable breakpoint which is never permanent, it > + may happen for `b *0' and `set breakpoint always-inserted off'. */ Maybe just an English suggestion, and a suggestion to make your comment more general: /* The memory might be unreachable. This can happen, for instance, when the user inserts a breakpoint at an invalid address. */ You'll notice that I removed the reference to permanent breakpoints, because I still don't understand why it's relevant. I suggest you checkin your patch with the comment as I suggested (once the doco part is approved by Eli), and then we can discuss together just that one comment (reviewing the whole patch at each iteration is a little time-consuming). Thanks, -- Joel