From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5120 invoked by alias); 9 Jun 2002 05:10:38 -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 5084 invoked from network); 9 Jun 2002 05:10:36 -0000 Received: from unknown (HELO is.elta.co.il) (199.203.121.2) by sources.redhat.com with SMTP; 9 Jun 2002 05:10:36 -0000 Received: from is (is [199.203.121.2]) by is.elta.co.il (8.9.3/8.8.8) with SMTP id IAA12877; Sun, 9 Jun 2002 08:08:33 +0300 (IDT) Date: Sat, 08 Jun 2002 22:10:00 -0000 From: Eli Zaretskii X-Sender: eliz@is To: Paul Mundt cc: gdb@sources.redhat.com Subject: Re: Software watchpoint breakage on SuperH In-Reply-To: <20020606085149.A6117@ChaoticDreams.ORG> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-06/txt/msg00066.txt.bz2 On Thu, 6 Jun 2002, Paul Mundt wrote: > Watchpoint 3 deleted because the program has left the block in > which its expression is valid. > printf (format=3D0x4005dc "%d\n") at printf.c:33 > 33 printf.c: No such file or directory. > in printf.c > (gdb) c > Continuing. > 10 > > Program exited normally. > (gdb)=20 > > Everything looks fine up until the point it tries to do the printf(). > > Is there something that needs to be implemented per target to support softw= > are > watchpoints properly? If not, does anyone have any suggestions as to what > could be going wrong in the above, and better yet, suggestions for possible > fixes? It's not necessarily a problem with watchpoint support. It could be that GDB cannot reliably detect where the current value of PC belong, so it mistakenly reports it's inside printf while in fact it's after `main' returns. Another possibility is that the code which determines the current stack frame is faulty (that's the code GDB runs to know whether the watchpoint is in scope).