From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22072 invoked by alias); 10 Nov 2015 23:39:58 -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 22055 invoked by uid 89); 10 Nov 2015 23:39:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_LOTSOFHASH,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-wm0-f45.google.com Received: from mail-wm0-f45.google.com (HELO mail-wm0-f45.google.com) (74.125.82.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 10 Nov 2015 23:39:56 +0000 Received: by wmec201 with SMTP id c201so24774167wme.1 for ; Tue, 10 Nov 2015 15:39:53 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.195.13.135 with SMTP id ey7mr7630310wjd.25.1447198793088; Tue, 10 Nov 2015 15:39:53 -0800 (PST) Received: by 10.28.59.65 with HTTP; Tue, 10 Nov 2015 15:39:53 -0800 (PST) In-Reply-To: References: Date: Tue, 10 Nov 2015 23:39: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/msg00012.txt.bz2 With single-step the same thing - installs both watchpoint and breakpoint. w \x00]0x00008180 in __delay_169 () at ../blinky.c:211 211 g_testloc =3D 1; (gdb) stepi 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: $p19#da...[\x00][\x00][\x00][\x00][\x00][\x00][\x00][ r +]Ack [$][9][7][0][1][0][0][6][0][#][9][7]Packet received: 97010060 [ 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]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]Sending packet: $Z0,8184,4#eb...[\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][3][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][3]Packet received: 881300002c01000088130000010000000a00000003000000e8030000b08100002= c0a021f23000000280a021f240a021f330c011fa09700008081000080810000090000900900= 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]Sending packet: $z0,8184,4#0b...[\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: $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 211 g_testloc =3D 1; (gdb) The g_testloc never gets set to 1. On Wed, Nov 11, 2015 at 1:26 AM, Juha Aaltonen wrot= e: > 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][\x= 00][\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: 881300002c01000088130000010000000a00000003000000e8030000b081000= 02c0a021f23000000280a021f240a021f430c011fa097000080810000808100000900009009= 0000900900009009000090090000900900009009000090090000900900009097010060 > [ > 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][\x= 00][\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 w= rote: >> 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.