* 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.
This commit is contained in:
Nathan Sidwell 2006-06-06 10:03:06 +00:00
parent 65864bd2a6
commit 5cffb35013
2 changed files with 12 additions and 13 deletions

View file

@ -1,3 +1,10 @@
2006-06-06 Nathan Sidwell <nathan@codesourcery.com>
* 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.
2006-06-02 Nick Roberts <nickrob@snap.net.nz>
* breakpoint.c (print_it_typical): Use EXEC_ASYNC_LOCATION_REACHED.

View file

@ -4477,9 +4477,7 @@ remote_insert_watchpoint (CORE_ADDR addr, int len, int type)
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);
return -1;
sprintf (rs->buf, "Z%x,", packet);
p = strchr (rs->buf, '\0');
@ -4511,9 +4509,7 @@ remote_remove_watchpoint (CORE_ADDR addr, int len, int type)
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);
return -1;
sprintf (rs->buf, "z%x,", packet);
p = strchr (rs->buf, '\0');
@ -4601,10 +4597,8 @@ remote_insert_hw_breakpoint (struct bp_target_info *bp_tgt)
BREAKPOINT_FROM_PC (&bp_tgt->placed_address, &bp_tgt->placed_size);
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);
return -1;
*(p++) = 'Z';
*(p++) = '1';
*(p++) = ',';
@ -4637,9 +4631,7 @@ remote_remove_hw_breakpoint (struct bp_target_info *bp_tgt)
char *p = rs->buf;
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);
return -1;
*(p++) = 'z';
*(p++) = '1';