aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2006-06-06 10:03:06 +0000
committerNathan Sidwell <nathan@codesourcery.com>2006-06-06 10:03:06 +0000
commit5cffb350132d39af2aac9598d2a14c9fde260cb5 (patch)
tree778bf23221a3729b82296ee5093580f2783eb029 /gdb/remote.c
parent65864bd2a680ce25c61802a416514fd526ad82a4 (diff)
downloadgdb-5cffb350132d39af2aac9598d2a14c9fde260cb5.zip
gdb-5cffb350132d39af2aac9598d2a14c9fde260cb5.tar.gz
gdb-5cffb350132d39af2aac9598d2a14c9fde260cb5.tar.bz2
* 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.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index c6ed900..529343d 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -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';