From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9343 invoked by alias); 5 Mar 2004 04:04:11 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 9335 invoked from network); 5 Mar 2004 04:04:10 -0000 Received: from unknown (HELO mail03.idc.renesas.com) (202.234.163.13) by sources.redhat.com with SMTP; 5 Mar 2004 04:04:10 -0000 Received: (from root@localhost) by guardian04.idc.renesas.com with id i25447Z3015991 for gdb-patches@sources.redhat.com; Fri, 5 Mar 2004 13:04:07 +0900 (JST) Received: from unknown [172.20.8.68] by guardian04.idc.renesas.com with SMTP id PAA15990 ; Fri, 5 Mar 2004 13:04:07 +0900 Received: from mrkaisv.hoku.renesas.com ([10.145.105.245]) by rnsmtp01.hoku_r.renesas.com (8.9.3/3.7W) with ESMTP id NAA29829 for ; Fri, 5 Mar 2004 13:04:06 +0900 (JST) Received: from E5A02646 (unknown [10.145.105.81]) by mrkaisv.hoku.renesas.com (Postfix) with SMTP id BB31F7980E2 for ; Fri, 5 Mar 2004 13:04:05 +0900 (JST) Message-ID: <015401c40267$4b33f5c0$5169910a@E5A02646> From: "Kei Sakamoto" To: References: <012c01c401cc$40c9ce20$5169910a@E5A02646> <404750EC.6090405@gnu.org> Subject: [RFA/m32r] Support hw watchpoint Date: Fri, 19 Mar 2004 00:09:00 -0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0151_01C402B2.BB04BA60" X-SW-Source: 2004-03/txt/msg00088.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_0151_01C402B2.BB04BA60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-length: 497 Hello, The attached patch adds hardware watchpoint support to m32rsdi target, which is a remote target of m32r architecture. # Thank you for Andrew's suggestion. This patch is small because I've already implemented watchpoint functions in remote-m32r-sdi.c. I just didn't know how to define watchpoint's interface in multi-arch. OK to commit? Kei Sakamoto Renesas Technology Corp. === 2004-03-05 Kei Sakamoto * remote-m32r-sdi.c: Support hardware watchpoint. ------=_NextPart_000_0151_01C402B2.BB04BA60 Content-Type: application/octet-stream; name="remote-m32r-sdi.c.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="remote-m32r-sdi.c.patch" Content-length: 2381 Index: remote-m32r-sdi.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/remote-m32r-sdi.c,v=0A= retrieving revision 1.1=0A= diff -u -r1.1 remote-m32r-sdi.c=0A= --- remote-m32r-sdi.c 16 Oct 2003 02:36:39 -0000 1.1=0A= +++ remote-m32r-sdi.c 5 Mar 2004 03:01:27 -0000=0A= @@ -1434,13 +1434,14 @@=0A= }=0A= =20=0A= =20=0A= -/* Tell whether this target can support a hardware breakpoint.=20=0A= - This implements the TARGET_CAN_USE_HARDWARE_WATCHPOINT macro. */=0A= +/* Tell whether this target can support a hardware breakpoint. CNT=0A= + is the number of hardware breakpoints already installed. This=0A= + implements the TARGET_CAN_USE_HARDWARE_WATCHPOINT macro. */=0A= =20=0A= int=0A= -m32r_can_use_hardware_watchpoint (void)=0A= +m32r_can_use_hw_watchpoint (int type, int cnt, int othertype)=0A= {=0A= - return max_access_breaks;=0A= + return sdi_desc !=3D NULL && cnt < max_access_breaks;=0A= }=0A= =20=0A= /* Set a data watchpoint. ADDR and LEN should be obvious. TYPE is 0=0A= @@ -1448,12 +1449,12 @@=0A= watchpoint. */=0A= =20=0A= int=0A= -m32r_set_watchpoint (CORE_ADDR addr, int len, int type)=0A= +m32r_insert_watchpoint (CORE_ADDR addr, int len, int type)=0A= {=0A= int i;=0A= =20=0A= if (remote_debug)=0A= - fprintf_unfiltered (gdb_stdlog, "m32r_set_watchpoint(%08lx,%d,%d)\n",= =0A= + fprintf_unfiltered (gdb_stdlog, "m32r_insert_watchpoint(%08lx,%d,%d)\n= ",=0A= addr, len, type);=0A= =20=0A= for (i =3D 0; i < MAX_ACCESS_BREAKS; i++)=0A= @@ -1618,6 +1619,11 @@=0A= m32r_ops.to_files_info =3D m32r_files_info;=0A= m32r_ops.to_insert_breakpoint =3D m32r_insert_breakpoint;=0A= m32r_ops.to_remove_breakpoint =3D m32r_remove_breakpoint;=0A= + m32r_ops.to_can_use_hw_breakpoint =3D m32r_can_use_hw_watchpoint;=0A= + m32r_ops.to_insert_watchpoint =3D m32r_insert_watchpoint;=0A= + m32r_ops.to_remove_watchpoint =3D m32r_remove_watchpoint;=0A= + m32r_ops.to_stopped_by_watchpoint =3D m32r_stopped_by_watchpoint;=0A= + m32r_ops.to_stopped_data_address =3D m32r_stopped_data_address;=0A= m32r_ops.to_kill =3D m32r_kill;=0A= m32r_ops.to_load =3D m32r_load;=0A= m32r_ops.to_create_inferior =3D m32r_create_inferior;=0A= ------=_NextPart_000_0151_01C402B2.BB04BA60-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9343 invoked by alias); 5 Mar 2004 04:04:11 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 9335 invoked from network); 5 Mar 2004 04:04:10 -0000 Received: from unknown (HELO mail03.idc.renesas.com) (202.234.163.13) by sources.redhat.com with SMTP; 5 Mar 2004 04:04:10 -0000 Received: (from root@localhost) by guardian04.idc.renesas.com with id i25447Z3015991 for gdb-patches@sources.redhat.com; Fri, 5 Mar 2004 13:04:07 +0900 (JST) Received: from unknown [172.20.8.68] by guardian04.idc.renesas.com with SMTP id PAA15990 ; Fri, 5 Mar 2004 13:04:07 +0900 Received: from mrkaisv.hoku.renesas.com ([10.145.105.245]) by rnsmtp01.hoku_r.renesas.com (8.9.3/3.7W) with ESMTP id NAA29829 for ; Fri, 5 Mar 2004 13:04:06 +0900 (JST) Received: from E5A02646 (unknown [10.145.105.81]) by mrkaisv.hoku.renesas.com (Postfix) with SMTP id BB31F7980E2 for ; Fri, 5 Mar 2004 13:04:05 +0900 (JST) Message-ID: <015401c40267$4b33f5c0$5169910a@E5A02646> From: "Kei Sakamoto" To: References: <012c01c401cc$40c9ce20$5169910a@E5A02646> <404750EC.6090405@gnu.org> Subject: [RFA/m32r] Support hw watchpoint Date: Fri, 05 Mar 2004 04:04:00 -0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0151_01C402B2.BB04BA60" X-SW-Source: 2004-03.o/txt/msg00088.txt Message-ID: <20040305040400.KCU90ferNRAwkwYDU2vo9WIsmN_RXkmhg_sv0m8vVfQ@z> This is a multi-part message in MIME format. ------=_NextPart_000_0151_01C402B2.BB04BA60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-length: 497 Hello, The attached patch adds hardware watchpoint support to m32rsdi target, which is a remote target of m32r architecture. # Thank you for Andrew's suggestion. This patch is small because I've already implemented watchpoint functions in remote-m32r-sdi.c. I just didn't know how to define watchpoint's interface in multi-arch. OK to commit? Kei Sakamoto Renesas Technology Corp. === 2004-03-05 Kei Sakamoto * remote-m32r-sdi.c: Support hardware watchpoint. ------=_NextPart_000_0151_01C402B2.BB04BA60 Content-Type: application/octet-stream; name="remote-m32r-sdi.c.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="remote-m32r-sdi.c.patch" Content-length: 2381 Index: remote-m32r-sdi.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/remote-m32r-sdi.c,v=0A= retrieving revision 1.1=0A= diff -u -r1.1 remote-m32r-sdi.c=0A= --- remote-m32r-sdi.c 16 Oct 2003 02:36:39 -0000 1.1=0A= +++ remote-m32r-sdi.c 5 Mar 2004 03:01:27 -0000=0A= @@ -1434,13 +1434,14 @@=0A= }=0A= =20=0A= =20=0A= -/* Tell whether this target can support a hardware breakpoint.=20=0A= - This implements the TARGET_CAN_USE_HARDWARE_WATCHPOINT macro. */=0A= +/* Tell whether this target can support a hardware breakpoint. CNT=0A= + is the number of hardware breakpoints already installed. This=0A= + implements the TARGET_CAN_USE_HARDWARE_WATCHPOINT macro. */=0A= =20=0A= int=0A= -m32r_can_use_hardware_watchpoint (void)=0A= +m32r_can_use_hw_watchpoint (int type, int cnt, int othertype)=0A= {=0A= - return max_access_breaks;=0A= + return sdi_desc !=3D NULL && cnt < max_access_breaks;=0A= }=0A= =20=0A= /* Set a data watchpoint. ADDR and LEN should be obvious. TYPE is 0=0A= @@ -1448,12 +1449,12 @@=0A= watchpoint. */=0A= =20=0A= int=0A= -m32r_set_watchpoint (CORE_ADDR addr, int len, int type)=0A= +m32r_insert_watchpoint (CORE_ADDR addr, int len, int type)=0A= {=0A= int i;=0A= =20=0A= if (remote_debug)=0A= - fprintf_unfiltered (gdb_stdlog, "m32r_set_watchpoint(%08lx,%d,%d)\n",= =0A= + fprintf_unfiltered (gdb_stdlog, "m32r_insert_watchpoint(%08lx,%d,%d)\n= ",=0A= addr, len, type);=0A= =20=0A= for (i =3D 0; i < MAX_ACCESS_BREAKS; i++)=0A= @@ -1618,6 +1619,11 @@=0A= m32r_ops.to_files_info =3D m32r_files_info;=0A= m32r_ops.to_insert_breakpoint =3D m32r_insert_breakpoint;=0A= m32r_ops.to_remove_breakpoint =3D m32r_remove_breakpoint;=0A= + m32r_ops.to_can_use_hw_breakpoint =3D m32r_can_use_hw_watchpoint;=0A= + m32r_ops.to_insert_watchpoint =3D m32r_insert_watchpoint;=0A= + m32r_ops.to_remove_watchpoint =3D m32r_remove_watchpoint;=0A= + m32r_ops.to_stopped_by_watchpoint =3D m32r_stopped_by_watchpoint;=0A= + m32r_ops.to_stopped_data_address =3D m32r_stopped_data_address;=0A= m32r_ops.to_kill =3D m32r_kill;=0A= m32r_ops.to_load =3D m32r_load;=0A= m32r_ops.to_create_inferior =3D m32r_create_inferior;=0A= ------=_NextPart_000_0151_01C402B2.BB04BA60--