From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30650 invoked by alias); 7 Sep 2009 18:18:06 -0000 Received: (qmail 30622 invoked by uid 22791); 7 Sep 2009 18:18:05 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 Sep 2009 18:17:56 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id AAE512BAB3C; Mon, 7 Sep 2009 14:17:54 -0400 (EDT) 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 NbEkoVhMjbsV; Mon, 7 Sep 2009 14:17:54 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 73E6B2BAB18; Mon, 7 Sep 2009 14:17:54 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 5A44BF589B; Mon, 7 Sep 2009 11:17:50 -0700 (PDT) Date: Mon, 07 Sep 2009 18:18:00 -0000 From: Joel Brobecker To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [patch] [ia64] Fix (#2) shadowing of breakpoints [testcase fixup] Message-ID: <20090907181750.GF30677@adacore.com> References: <20090905185856.GA16389@host0.dyn.jankratochvil.net> <20090907041040.GA25651@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090907041040.GA25651@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.18 (2008-05-17) 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: 2009-09/txt/msg00161.txt.bz2 > gdb/ > 2009-09-05 Jan Kratochvil > > Fix ia64 shadowing of breakpoints in multiple slots of a single bundle. > * ia64-tdep.c (ia64_memory_insert_breakpoint): New call > of make_show_memory_breakpoints_cleanup with parameter 0. Move the > reading of SHADOW_CONTENTS to this memory state point of code. Patch is approved. I had a hard time understanding what was going on (relatively speaking), but eventually got it. Perhaps a little comment updated as suggested below might help; your call. > gdb/testsuite/ > 2009-09-07 Jan Kratochvil > > * gdb.base/breakpoint-shadow.exp (Second breakpoint placed): Initialize > $bpt2address. > (Second breakpoint address is valid on ia64) > (ia64 breakpoint in the Second breakpoint bundle): New. Approved as well :). > /* Disable the automatic memory restoration from breakpoints while > we read our instruction bundle. Otherwise, the general restoration > mechanism kicks in and we would possibly remove parts of the adjacent > placed breakpoints. It is due to our SHADOW_CONTENTS overlapping the real This is where I think it would be worth explaining that we are *re* reading the bundle except that, this time, we are reading it in order to compute the new bundle inside which we'll be inserting the breakpoint. Therefore, we have to disable the automatic memory restoration, bla bla bla. > +if [istarget "ia64-*-*"] then { > + # Unoptimized code should not use the 3rd slot for the first instruction of > + # a source line. This is important for our test, because we want both breakpoints (break-first and break-second) to be in the same bundle. -- Joel