From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20606 invoked by alias); 14 Feb 2003 16:36:24 -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 20599 invoked from network); 14 Feb 2003 16:36:24 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 14 Feb 2003 16:36:24 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h1EGaOf22679 for ; Fri, 14 Feb 2003 11:36:24 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1EGaOa01078; Fri, 14 Feb 2003 11:36:24 -0500 Received: from deneb.localdomain (msalter.cipe.redhat.com [10.0.0.36]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1EGaNZ28772; Fri, 14 Feb 2003 11:36:23 -0500 Received: by deneb.localdomain (Postfix, from userid 500) id 9443D78A6D; Fri, 14 Feb 2003 11:36:21 -0500 (EST) From: Mark Salter To: hoogerbrugge@hotmail.com Cc: gdb@sources.redhat.com In-reply-to: (hoogerbrugge@hotmail.com) Subject: Re: Remote breakpoint problem References: Message-Id: <20030214163621.9443D78A6D@deneb.localdomain> Date: Fri, 14 Feb 2003 16:36:00 -0000 X-SW-Source: 2003-02/txt/msg00241.txt.bz2 >>>>> Jan Hoogerbrugge writes: >> From: Mark Salter >> To: ac131313@redhat.com >> >>>>> Andrew Cagney writes: >> >> >> Hi, >> >> >> >> I am porting gdb to a new target processor were remote debugging is >> used. I have a problem with breakpoints. When I place a breakpoint on foo >> followed by a continue I see the following communication between gdb and >> the stub on the other side: >> >> >> >> - the instruction at foo is saved >> >> - foo is replaced by a breakpoint instruction >> >> - gdb sends a continue command >> >> - the stub reports the breakpoint hit (signal = 5, pc = foo) >> >> - gdb replaces the code at foo with the saved instruction >> >> - gdb sends a step instruction command >> >> - tbe stub reports again a breakpoint hit at foo (signal = 5, pc = foo) >> >> > Shouldn't this stop beyond foo? >> >> I wonder if the stub is flushing the icache after gdb puts the >> saved instruction back... > Caches are properly syncronisched. The respone of the remote target and its > stub is correct as far as I can see. It is gdb that issues a continue > command to the stub after hitting the breakpoint and single stepping the > instruction on which teh breakpoint was placed. But there is no breakpoint in place when gdb sends the step instruction. >> >> - gdb replaces the code at foo with the saved instruction >> >> - gdb sends a step instruction command >> >> - tbe stub reports again a breakpoint hit at foo (signal = 5, pc = foo) So, why did the stub report that it stopped at foo, rather than the next instruction. --Mark