From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28867 invoked by alias); 12 Oct 2005 21:20:05 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 28742 invoked by uid 22791); 12 Oct 2005 21:20:01 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 12 Oct 2005 21:20:01 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1EPo0z-0000FT-U1; Wed, 12 Oct 2005 17:19:58 -0400 Date: Wed, 12 Oct 2005 21:20:00 -0000 From: Daniel Jacobowitz To: Claudia Salzberg Cc: gdb@sourceware.org Subject: Re: gdb watch command on ppc Message-ID: <20051012211957.GA829@nevyn.them.org> Mail-Followup-To: Claudia Salzberg , gdb@sourceware.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-10/txt/msg00082.txt.bz2 On Wed, Oct 12, 2005 at 04:16:07PM -0500, Claudia Salzberg wrote: > I have noticed a discrepancy between the way the gdb for ppc handles > watchpoints on pointers. I am trying to place a software watchpoint on a > variable of type int * and am not getting the expected results. Note that > I observe the expected functionality (the watchpoint being correctly set) > on x86 and that I have tried the following on today's cvs head. I have > also tried this on various ppc machines with the same result. I include > the sample program that matches the output shown below as well as an > additional program that generates the same behavior. I do not see this if > I attempt to place a watchpoint on a non pointer variable. Thanks for > your input. First of all, GDB doesn't support HW watchpoints for PPC at the moment; are you using Manoj's patches? At least I don't think it does. > Breakpoint 1, main () at main.c:13 > 13 int *a = (int *)malloc(sizeof(int)); > (gdb) watch a > Watchpoint 2: a If it did, this would say "Hardware Watchpoint"; you're getting single-step watchpoints. > (gdb) c > Continuing. > > Watchpoint 2 deleted because the program has left the block in > which its expression is valid. > fixup (l=0x7ffff620, reloc_offset=0) at dl-runtime.c:63 > 63 dl-runtime.c: No such file or directory. > in dl-runtime.c This may be a backtrace bug. GDB thinks that main() has returned, because it failed to backtrace out of the dynamic linker in the call to malloc(). -- Daniel Jacobowitz CodeSourcery, LLC