From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11702 invoked by alias); 5 Jun 2006 14:30:57 -0000 Received: (qmail 11693 invoked by uid 22791); 5 Jun 2006 14:30:56 -0000 X-Spam-Check-By: sourceware.org Received: from intranet.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.6) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 05 Jun 2006 14:30:54 +0000 Received: (qmail 12897 invoked from network); 5 Jun 2006 14:30:52 -0000 Received: from unknown (HELO ?192.168.189.145?) (nathan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 5 Jun 2006 14:30:52 -0000 Message-ID: <44843FD6.7060300@codesourcery.com> Date: Mon, 05 Jun 2006 14:30:00 -0000 From: Nathan Sidwell User-Agent: Mozilla Thunderbird 1.0.8 (X11/20060502) MIME-Version: 1.0 To: Eli Zaretskii CC: gdb-patches@sourceware.org, Daniel Jacobowitz Subject: Re: patch for invalid hw breakpoints References: <447EE9A8.4050800@codesourcery.com> <20060601172639.GA25709@nevyn.them.org> <447F27BC.6030808@codesourcery.com> <20060601180321.GA26791@nevyn.them.org> <20060601211159.GA557@nevyn.them.org> In-Reply-To: Content-Type: multipart/mixed; boundary="------------050306020104000401080704" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00034.txt.bz2 This is a multi-part message in MIME format. --------------050306020104000401080704 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 451 Eli Zaretskii wrote: >>Date: Thu, 1 Jun 2006 17:11:59 -0400 >>From: Daniel Jacobowitz >>Cc: Nathan Sidwell , gdb-patches@sourceware.org >> > > Indeed. But I think remote.c shouldn't throw an internal error in > such cases. This patch ok? nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk --------------050306020104000401080704 Content-Type: text/x-patch; name="remote-1.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="remote-1.patch" Content-length: 3301 2006-06-05 Nathan Sidwell * gdb/remote.c (remote_insert_watchpoint): Return -1, rather than fatal error if packet is disabled. (remote_remove_watchpoint, remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise. Index: gdb/remote.c =================================================================== RCS file: /cvs/src/src/gdb/remote.c,v retrieving revision 1.202.2.4 diff -c -3 -p -r1.202.2.4 remote.c *** gdb/remote.c 24 May 2006 08:00:02 -0000 1.202.2.4 --- gdb/remote.c 5 Jun 2006 14:26:11 -0000 *************** remote_insert_watchpoint (CORE_ADDR addr *** 4670,4678 **** enum Z_packet_type packet = watchpoint_to_Z_packet (type); if (remote_protocol_packets[PACKET_Z0 + packet].support == PACKET_DISABLE) ! error (_("Can't set hardware watchpoints without the '%s' (%s) packet."), ! remote_protocol_packets[PACKET_Z0 + packet].name, ! remote_protocol_packets[PACKET_Z0 + packet].title); sprintf (buf, "Z%x,", packet); p = strchr (buf, '\0'); --- 4670,4676 ---- enum Z_packet_type packet = watchpoint_to_Z_packet (type); if (remote_protocol_packets[PACKET_Z0 + packet].support == PACKET_DISABLE) ! return -1; sprintf (buf, "Z%x,", packet); p = strchr (buf, '\0'); *************** remote_remove_watchpoint (CORE_ADDR addr *** 4705,4714 **** enum Z_packet_type packet = watchpoint_to_Z_packet (type); if (remote_protocol_packets[PACKET_Z0 + packet].support == PACKET_DISABLE) ! error (_("Can't clear hardware watchpoints without the '%s' (%s) packet."), ! remote_protocol_packets[PACKET_Z0 + packet].name, ! remote_protocol_packets[PACKET_Z0 + packet].title); ! sprintf (buf, "z%x,", packet); p = strchr (buf, '\0'); addr = remote_address_masked (addr); --- 4703,4710 ---- enum Z_packet_type packet = watchpoint_to_Z_packet (type); if (remote_protocol_packets[PACKET_Z0 + packet].support == PACKET_DISABLE) ! return -1; ! sprintf (buf, "z%x,", packet); p = strchr (buf, '\0'); addr = remote_address_masked (addr); *************** remote_insert_hw_breakpoint (CORE_ADDR a *** 4796,4805 **** BREAKPOINT_FROM_PC (&addr, &len); if (remote_protocol_packets[PACKET_Z1].support == PACKET_DISABLE) ! error (_("Can't set hardware breakpoint without the '%s' (%s) packet."), ! remote_protocol_packets[PACKET_Z1].name, ! remote_protocol_packets[PACKET_Z1].title); ! *(p++) = 'Z'; *(p++) = '1'; *(p++) = ','; --- 4792,4799 ---- BREAKPOINT_FROM_PC (&addr, &len); if (remote_protocol_packets[PACKET_Z1].support == PACKET_DISABLE) ! return -1; ! *(p++) = 'Z'; *(p++) = '1'; *(p++) = ','; *************** remote_remove_hw_breakpoint (CORE_ADDR a *** 4838,4846 **** BREAKPOINT_FROM_PC (&addr, &len); if (remote_protocol_packets[PACKET_Z1].support == PACKET_DISABLE) ! error (_("Can't clear hardware breakpoint without the '%s' (%s) packet."), ! remote_protocol_packets[PACKET_Z1].name, ! remote_protocol_packets[PACKET_Z1].title); *(p++) = 'z'; *(p++) = '1'; --- 4832,4838 ---- BREAKPOINT_FROM_PC (&addr, &len); if (remote_protocol_packets[PACKET_Z1].support == PACKET_DISABLE) ! return -1; *(p++) = 'z'; *(p++) = '1'; --------------050306020104000401080704--