From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111497 invoked by alias); 10 Nov 2015 23:26:46 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 111455 invoked by uid 89); 10 Nov 2015 23:26:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_LOTSOFHASH,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-wm0-f47.google.com Received: from mail-wm0-f47.google.com (HELO mail-wm0-f47.google.com) (74.125.82.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 10 Nov 2015 23:26:44 +0000 Received: by wmdw130 with SMTP id w130so92285720wmd.0 for ; Tue, 10 Nov 2015 15:26:41 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.28.170.19 with SMTP id t19mr6920298wme.65.1447198001438; Tue, 10 Nov 2015 15:26:41 -0800 (PST) Received: by 10.28.59.65 with HTTP; Tue, 10 Nov 2015 15:26:41 -0800 (PST) In-Reply-To: References: Date: Tue, 10 Nov 2015 23:26:00 -0000 Message-ID: Subject: Re: How are watchpoints handled? (remote serial) From: Juha Aaltonen To: gdb-mailing list Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00011.txt.bz2 Maybe that's a bug in gdb-multiarch 7.7.1? Remote-debugging an ARM (watch g_testloc): (This is as it should be.) gdbarch_dump: have_nonsteppable_watchpoint =3D 1 w \x00]0x00008180 in __delay_169 () at ../blinky.c:211 211 g_testloc =3D 1; (gdb) cont Continuing. Sending packet: $m81b0,4#c8...[\x00][\x00][\x00][\x00][\x00][\x00][\x00][\x00][\x00][\x00][= \x00][ r +]Ack [$][0][0][0][0][0][0][0][0][#][8][0]Packet received: 00000000 [ w \x00]Sending packet: $Z2,81b0,4#13...[\x00][\x00][\x00][\x00][\x00][\x00][\x00][\x00][\x00][\x00= ][\x00][\x00][\x00][ r +]Ack [$][O][K][#][9][a]Packet received: OK [ w \x00]Sending packet: $c#63...[\x00][\x00][\x00][\x00][\x00][ r +]Ack [$][T][0][5][#][b][9]Packet received: T05 [ w \x00]Sending packet: $g#67...[\x00][\x00][\x00][\x00][\x00][ r +]Ack [$][8][8][1][3][0][0][0][0][2][c][0][1][0][0][0][0][8][8][1][3][0][0][0][0]= [0][1][0][0][0][0][0][0][0][a][0][0][0][0][0][0][0][3][0][0][0][0][0][0][e]= [8][0][3][0][0][0][0][b][0][8][1][0][0][0][0][2][c][0][a][0][2][1][f][2][3]= [0][0][0][0][0][0][2][8][0][a][0][2][1][f][2][4][0][a][0][2][1][f][4][3][0]= [c][0][1][1][f][a][0][9][7][0][0][0][0][8][0][8][1][0][0][0][0][8][0][8][1]= [0][0][0][0][0][9][0][0][0][0][9][0][0][9][0][0][0][0][9][0][0][9][0][0][0]= [0][9][0][0][9][0][0][0][0][9][0][0][9][0][0][0][0][9][0][0][9][0][0][0][0]= [9][0][0][9][0][0][0][0][9][0][0][9][0][0][0][0][9][0][0][9][0][0][0][0][9]= [0][9][7][0][1][0][0][6][0][#][2][4]Packet received: 881300002c01000088130000010000000a00000003000000e8030000b08100002= c0a021f23000000280a021f240a021f430c011fa09700008081000080810000090000900900= 00900900009009000090090000900900009009000090090000900900009097010060 [ w \x00]Sending packet: $m8180,4#9e...[\x00][\x00][\x00][\x00][\x00][\x00][\x00][\x00][\x00][\x00][= \x00][ r +]Ack [$][0][0][3][0][8][7][e][5][#][c][c]Packet received: 003087e5 [ ... (lots of memory reads) ... [ w \x00]Sending packet: $m8180,4#9e...[\x00][\x00][\x00][\x00][\x00][\x00][\x00][\x00][\x00][\x00][= \x00][ r +]Ack [$][0][0][3][0][8][7][e][5][#][c][c]Packet received: 003087e5 [ w \x00] Program received signal SIGTRAP, Trace/breakpoint trap. Sending packet: $z2,81b0,4#33...[\x00][\x00][\x00][\x00][\x00][\x00][\x00][\x00][\x00][\x00= ][\x00][\x00][\x00][ r +]Ack [$][O][K][#][9][a]Packet received: OK [ w \x00]0x00008180 in __delay_169 () at ../blinky.c:211 211 g_testloc =3D 1; (gdb) No stepping over watchpoint. On Tue, Nov 10, 2015 at 12:57 AM, Juha Aaltonen wro= te: > How should the watchpoints be handled by remote stub/server? > It seems that when 'cont'-command is given, gdb re-installs watchpoint > and sends 'c'-packet. > > If the return address is the trap address, the watchpoint trigs again, > but if the address is advanced, > the access is not done at all, because the watchpoint makes exception > before the access is made.