This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[rfc/help] Split up Z packet enable/disable cmd
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: [rfc/help] Split up Z packet enable/disable cmd
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 02 Aug 2000 18:36:42 +1000
Hello,
The attatched patch replaces the
(gdb) set remote Z-packet {auto,on,off}
with separate set/show commands for each Z packet variant. Support for
software / hardware breakpoints and read/write/access watchpoints is
orthogonal. Targets will report no support for one but support for
another - since GDB grouped them all together it confused the poor
program :-(
This patch splits the Z packet enable/disable command into separate
commands so that each sub packet can be disabled/enabled independantly.
I'd really appreciate feedback from people with random remote targets
that do/don't support the Z packet.
enjoy,
Andrew
PS: It doesn't fix the compile time test for remote watchpoints but it
does enable the code always (so that I've a better chance of not
breaking it :-).
Wed Aug 2 16:12:27 2000 Andrew Cagney <cagney@b1.cygnus.com>
* remote.c (enum Z_packet_type): Define.
(remote_protocol_Z): Change to an array of size NR_Z_PACKET_TYPES.
(remote_insert_watchpoint): Check watchpoint type.
(watchpoint_to_Z_packet): New function.
(enum packet_result): Define.
(packet_ok): New function. Return enum packet_result.
(init_packet_configs): New function.
(remote_open_1, remote_async_open_1, remote_cisco_open): Use
init_packet_configs instead of initializing remote_protocol_P,
remote_protocol_Z, remote_protocol_binary_download separatly.
(remote_remove_hw_breakpoint, remote_insert_hw_breakpoint,
remote_remove_watchpoint, remote_insert_watchpoint): Use
watchpoint_to_Z_packet and packet_ok. Remove #ifdef
TARGET_HAS_HARDWARE_WATCHPOINTS.
(set_remote_protocol_Z_software_bp_packet_cmd,
show_remote_protocol_Z_software_bp_packet_cmd,
set_remote_protocol_Z_hardware_bp_packet_cmd,
show_remote_protocol_Z_hardware_bp_packet_cmd,
set_remote_protocol_Z_write_wp_packet_cmd,
show_remote_protocol_Z_write_wp_packet_cmd,
set_remote_protocol_Z_read_wp_packet_cmd,
show_remote_protocol_Z_read_wp_packet_cmd,
set_remote_protocol_Z_access_wp_packet_cmd,
show_remote_protocol_Z_access_wp_packet_cmd): Replace
show_remote_protocol_Z_packet_cmd and
set_remote_protocol_Z_packet_cmd.
* TODO: Update.
Index: TODO
===================================================================
RCS file: /cvs/src/src/gdb/TODO,v
retrieving revision 1.44
diff -p -r1.44 TODO
*** TODO 2000/08/02 05:40:25 1.44
--- TODO 2000/08/02 08:23:22
*************** parse.c:build_parse() has a buffer overr
*** 340,345 ****
--- 340,350 ----
--
+ Move remote_remove_hw_breakpoint, remote_insert_hw_breakpoint,
+ remote_remove_watchpoint, remote_insert_watchpoint into target vector.
+
+ --
+
New Features and Fixes
======================
*************** ignored and a timeout is required before
*** 651,657 ****
fixing this this is making GDB's remote protocol packet more robust.
While downloading to a remote protocol target, gdb ignores packet
! errors in so far as it will continue to edownload with chunk N+1 even
if chunk N was not correctly sent. This causes gdb.base/remote.exp to
take a painfully long time to run. As a PS that test needs to be
fixed so that it builds on 16 bit machines.
--- 656,662 ----
fixing this this is making GDB's remote protocol packet more robust.
While downloading to a remote protocol target, gdb ignores packet
! errors in so far as it will continue to download with chunk N+1 even
if chunk N was not correctly sent. This causes gdb.base/remote.exp to
take a painfully long time to run. As a PS that test needs to be
fixed so that it builds on 16 bit machines.
*************** on the fly - should it be returned in th
*** 673,683 ****
Underlying problem is that the register file is target endian. If the
target endianess changes gdb doesn't know.
-
- --
-
- Use the recently added add_set_auto_boolean_cmd() function to
- implement the X-packet commands.
--
--- 678,683 ----
Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.17
diff -p -r1.17 remote.c
*** remote.c 2000/08/02 05:40:25 1.17
--- remote.c 2000/08/02 08:23:34
*************** static void set_remote_protocol_P_packet
*** 216,230 ****
static void show_remote_protocol_P_packet_cmd (char *args, int from_tty);
- static void set_remote_protocol_Z_packet_cmd (char *args,
- int from_tty,
- struct cmd_list_element *c);
-
- static void show_remote_protocol_Z_packet_cmd (char *args, int from_tty);
-
-
-
-
/* Define the target subroutine names */
void open_remote_target (char *, int, struct target_ops *, int);
--- 216,221 ----
*************** struct packet_config
*** 526,531 ****
--- 517,595 ----
enum packet_support support;
};
+ /* Analyze a packet's return value and update the packet config
+ accordingly. */
+
+ enum packet_result
+ {
+ PACKET_ERROR,
+ PACKET_OK,
+ PACKET_UNKNOWN
+ };
+
+ static enum packet_result
+ packet_ok (const char *buf, struct packet_config *config)
+ {
+ if (buf[0] != '\0')
+ {
+ /* The stub recognized the packet request. Check that the
+ operation succeeded. */
+ switch (config->support)
+ {
+ case PACKET_SUPPORT_UNKNOWN:
+ if (remote_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "Packet %s (%s) is supported\n",
+ config->name, config->title);
+ config->support = PACKET_ENABLE;
+ break;
+ case PACKET_DISABLE:
+ internal_error ("packet_ok: disabled packet succeeded");
+ break;
+ case PACKET_ENABLE:
+ break;
+ }
+ if (buf[0] == 'O' && buf[1] == 'K' && buf[2] == '\0')
+ /* "OK" - definitly OK. */
+ return PACKET_OK;
+ if (buf[0] == 'E'
+ && isxdigit (buf[1]) && isxdigit (buf[2])
+ && buf[3] == '\0')
+ /* "Enn" - definitly an error. */
+ return PACKET_ERROR;
+ /* The packet may or may not be OK. Just assume it is */
+ return PACKET_OK;
+ }
+ else
+ {
+ /* The stub does not support the packet. */
+ switch (config->support)
+ {
+ case PACKET_ENABLE:
+ if (config->detect == CMD_AUTO_BOOLEAN_AUTO)
+ /* If the stub previously indicated that the packet was
+ supported then there is a protocol error.. */
+ error ("Protocol error: %s (%s) conflicting enabled responses.",
+ config->name, config->title);
+ else
+ /* The user set it wrong. */
+ error ("Enabled packet %s (%s) not recognized by stub",
+ config->name, config->title);
+ break;
+ case PACKET_SUPPORT_UNKNOWN:
+ if (remote_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "Packet %s (%s) is NOT supported\n",
+ config->name, config->title);
+ config->support = PACKET_DISABLE;
+ break;
+ case PACKET_DISABLE:
+ break;
+ }
+ return PACKET_UNKNOWN;
+ }
+ }
+
static void
set_packet_config_cmd (struct packet_config *config, struct cmd_list_element *c)
{
*************** show_remote_protocol_P_packet_cmd (char
*** 626,648 ****
show_packet_config_cmd (&remote_protocol_P);
}
! /* Should we try the 'Z' (set breakpoint) request? */
! static struct packet_config remote_protocol_Z;
static void
! set_remote_protocol_Z_packet_cmd (char *args, int from_tty,
! struct cmd_list_element *c)
{
! set_packet_config_cmd (&remote_protocol_Z, c);
}
static void
! show_remote_protocol_Z_packet_cmd (char *args, int from_tty)
{
! show_packet_config_cmd (&remote_protocol_Z);
}
/* Should we try the 'X' (remote binary download) packet?
This variable (available to the user via "set remote X-packet")
--- 690,777 ----
show_packet_config_cmd (&remote_protocol_P);
}
! /* Should we try one of the 'Z' requests? */
! enum Z_packet_type
! {
! Z_PACKET_SOFTWARE_BP,
! Z_PACKET_HARDWARE_BP,
! Z_PACKET_WRITE_WP,
! Z_PACKET_READ_WP,
! Z_PACKET_ACCESS_WP,
! NR_Z_PACKET_TYPES
! };
+ static struct packet_config remote_protocol_Z[NR_Z_PACKET_TYPES];
+
+ /* FIXME: Instead of having all these boiler plate functions, the
+ command callback should include a context argument. */
+
static void
! set_remote_protocol_Z_software_bp_packet_cmd (char *args, int from_tty,
! struct cmd_list_element *c)
! {
! set_packet_config_cmd (&remote_protocol_Z[Z_PACKET_SOFTWARE_BP], c);
! }
!
! static void
! show_remote_protocol_Z_software_bp_packet_cmd (char *args, int from_tty)
! {
! show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_SOFTWARE_BP]);
! }
!
! static void
! set_remote_protocol_Z_hardware_bp_packet_cmd (char *args, int from_tty,
! struct cmd_list_element *c)
! {
! set_packet_config_cmd (&remote_protocol_Z[Z_PACKET_HARDWARE_BP], c);
! }
!
! static void
! show_remote_protocol_Z_hardware_bp_packet_cmd (char *args, int from_tty)
! {
! show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_HARDWARE_BP]);
! }
!
! static void
! set_remote_protocol_Z_write_wp_packet_cmd (char *args, int from_tty,
! struct cmd_list_element *c)
{
! set_packet_config_cmd (&remote_protocol_Z[Z_PACKET_WRITE_WP], c);
}
static void
! show_remote_protocol_Z_write_wp_packet_cmd (char *args, int from_tty)
{
! show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_WRITE_WP]);
}
+ static void
+ set_remote_protocol_Z_read_wp_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
+ {
+ set_packet_config_cmd (&remote_protocol_Z[Z_PACKET_READ_WP], c);
+ }
+
+ static void
+ show_remote_protocol_Z_read_wp_packet_cmd (char *args, int from_tty)
+ {
+ show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_READ_WP]);
+ }
+
+ static void
+ set_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
+ {
+ set_packet_config_cmd (&remote_protocol_Z[Z_PACKET_ACCESS_WP], c);
+ }
+
+ static void
+ show_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty)
+ {
+ show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_ACCESS_WP]);
+ }
+
/* Should we try the 'X' (remote binary download) packet?
This variable (available to the user via "set remote X-packet")
*************** extended_remote_async_open (char *name,
*** 1884,1889 ****
--- 2013,2030 ----
static DCACHE *remote_dcache;
static void
+ init_packet_configs (void)
+ {
+ int i;
+ init_packet_config (&remote_protocol_P);
+ for (i = 0; i < NR_Z_PACKET_TYPES; i++)
+ init_packet_config (&remote_protocol_Z[i]);
+ /* Force remote_write_bytes to check whether target supports binary
+ downloading. */
+ init_packet_config (&remote_protocol_binary_download);
+ }
+
+ static void
remote_open_1 (char *name, int from_tty, struct target_ops *target,
int extended_p)
{
*************** serial device is attached to the remote
*** 1928,1943 ****
}
push_target (target); /* Switch to using remote target now */
! init_packet_config (&remote_protocol_P);
! init_packet_config (&remote_protocol_Z);
general_thread = -2;
continue_thread = -2;
- /* Force remote_write_bytes to check whether target supports
- binary downloading. */
- init_packet_config (&remote_protocol_binary_download);
-
/* Probe for ability to use "ThreadInfo" query, as required. */
use_threadinfo_query = 1;
use_threadextra_query = 1;
--- 2069,2079 ----
}
push_target (target); /* Switch to using remote target now */
! init_packet_configs ();
general_thread = -2;
continue_thread = -2;
/* Probe for ability to use "ThreadInfo" query, as required. */
use_threadinfo_query = 1;
use_threadextra_query = 1;
*************** serial device is attached to the remote
*** 2014,2029 ****
push_target (target); /* Switch to using remote target now */
! init_packet_config (&remote_protocol_P);
! init_packet_config (&remote_protocol_Z);
general_thread = -2;
continue_thread = -2;
- /* Force remote_write_bytes to check whether target supports
- binary downloading. */
- init_packet_config (&remote_protocol_binary_download);
-
/* Probe for ability to use "ThreadInfo" query, as required. */
use_threadinfo_query = 1;
use_threadextra_query = 1;
--- 2150,2160 ----
push_target (target); /* Switch to using remote target now */
! init_packet_configs ();
general_thread = -2;
continue_thread = -2;
/* Probe for ability to use "ThreadInfo" query, as required. */
use_threadinfo_query = 1;
use_threadextra_query = 1;
*************** remote_insert_breakpoint (CORE_ADDR addr
*** 4084,4096 ****
#endif
int bp_size;
! /* Try the "Z" packet if it is not already disabled.
! If it succeeds, then set the support to PACKET_ENABLE.
! If it fails, and the user has explicitly requested the Z support
! then report an error, otherwise, mark it disabled and go on. */
! if ((remote_protocol_Z.support == PACKET_ENABLE)
! || (remote_protocol_Z.support == PACKET_SUPPORT_UNKNOWN))
{
char *buf = alloca (PBUFSIZ);
char *p = buf;
--- 4215,4226 ----
#endif
int bp_size;
! /* Try the "Z" s/w breakpoint packet if it is not already disabled.
! If it succeeds, then set the support to PACKET_ENABLE. If it
! fails, and the user has explicitly requested the Z support then
! report an error, otherwise, mark it disabled and go on. */
! if (remote_protocol_Z[Z_PACKET_SOFTWARE_BP].support != PACKET_DISABLE)
{
char *buf = alloca (PBUFSIZ);
char *p = buf;
*************** remote_insert_breakpoint (CORE_ADDR addr
*** 4106,4129 ****
putpkt (buf);
getpkt (buf, PBUFSIZ, 0);
! if (buf[0] != '\0')
! {
! remote_protocol_Z.support = PACKET_ENABLE;
! return (buf[0] == 'E');
! }
!
! /* The stub does not support the 'Z' request. If the user has
! explicitly requested the Z support, or if the stub previously
! said it supported the packet, this is an error,
! otherwise, mark it disabled. */
!
! else if (remote_protocol_Z.support == PACKET_ENABLE)
{
! error ("Protocol error: Z packet not recognized by stub");
! }
! else
! {
! remote_protocol_Z.support = PACKET_DISABLE;
}
}
--- 4236,4249 ----
putpkt (buf);
getpkt (buf, PBUFSIZ, 0);
! switch (packet_ok (buf, &remote_protocol_Z[Z_PACKET_SOFTWARE_BP]))
{
! case PACKET_ERROR:
! return -1;
! case PACKET_OK:
! return 0;
! case PACKET_UNKNOWN:
! break;
}
}
*************** remote_remove_breakpoint (CORE_ADDR addr
*** 4151,4158 ****
{
int bp_size;
! if ((remote_protocol_Z.support == PACKET_ENABLE)
! || (remote_protocol_Z.support == PACKET_SUPPORT_UNKNOWN))
{
char *buf = alloca (PBUFSIZ);
char *p = buf;
--- 4271,4277 ----
{
int bp_size;
! if (remote_protocol_Z[Z_PACKET_SOFTWARE_BP].support != PACKET_DISABLE)
{
char *buf = alloca (PBUFSIZ);
char *p = buf;
*************** remote_remove_breakpoint (CORE_ADDR addr
*** 4179,4195 ****
#endif /* REMOTE_BREAKPOINT */
}
! #ifdef TARGET_HAS_HARDWARE_WATCHPOINTS
int
remote_insert_watchpoint (CORE_ADDR addr, int len, int type)
{
char *buf = alloca (PBUFSIZ);
char *p;
! if (remote_protocol_Z.support == PACKET_DISABLE)
! error ("Can't set hardware watchpoints without the 'Z' packet\n");
! sprintf (buf, "Z%x,", type + 2 );
p = strchr (buf, '\0');
addr = remote_address_masked (addr);
p += hexnumstr (p, (ULONGEST) addr);
--- 4298,4338 ----
#endif /* REMOTE_BREAKPOINT */
}
! static int
! watchpoint_to_Z_packet (int type)
! {
! switch (type)
! {
! case hw_write:
! return 2;
! break;
! case hw_read:
! return 3;
! break;
! case hw_access:
! return 4;
! break;
! default:
! internal_error ("hw_bp_to_z: bad watchpoint type %d", type);
! }
! }
!
! /* FIXME: This function should be static and a member of the remote
! target vector. */
!
int
remote_insert_watchpoint (CORE_ADDR addr, int len, int type)
{
char *buf = alloca (PBUFSIZ);
char *p;
+ enum Z_packet_type packet = watchpoint_to_Z_packet (type);
! if (remote_protocol_Z[packet].support == PACKET_DISABLE)
! error ("Can't set hardware watchpoints without the '%s' (%s) packet\n",
! remote_protocol_Z[packet].name,
! remote_protocol_Z[packet].title);
! sprintf (buf, "Z%x,", packet);
p = strchr (buf, '\0');
addr = remote_address_masked (addr);
p += hexnumstr (p, (ULONGEST) addr);
*************** remote_insert_watchpoint (CORE_ADDR addr
*** 4197,4238 ****
putpkt (buf);
getpkt (buf, PBUFSIZ, 0);
-
- if (buf[0] == '\0' || buf [0] == 'E')
- return -1;
! return 0;
}
int
remote_remove_watchpoint (CORE_ADDR addr, int len, int type)
{
char *buf = alloca (PBUFSIZ);
char *p;
! sprintf (buf, "z%x,", type + 2 );
p = strchr (buf, '\0');
addr = remote_address_masked (addr);
p += hexnumstr (p, (ULONGEST) addr);
sprintf (p, ",%x", len);
putpkt (buf);
getpkt (buf, PBUFSIZ, 0);
-
- if (buf[0] == '\0' || buf [0] == 'E')
- return -1;
! return 0;
}
int
remote_insert_hw_breakpoint (CORE_ADDR addr, int len)
{
char *buf = alloca (PBUFSIZ);
char *p = buf;
! if (remote_protocol_Z.support == PACKET_DISABLE)
! error ("Can't set hardware breakpoints without the 'Z' packet\n");
!
*(p++) = 'Z';
*(p++) = '1';
*(p++) = ',';
--- 4340,4405 ----
putpkt (buf);
getpkt (buf, PBUFSIZ, 0);
! switch (packet_ok (buf, &remote_protocol_Z[packet]))
! {
! case PACKET_ERROR:
! case PACKET_UNKNOWN:
! return -1;
! case PACKET_OK:
! return 0;
! }
! internal_error ("remote_insert_watchpoint: reached end of function");
}
+ /* FIXME: This function should be static and a member of the remote
+ target vector. */
+
int
remote_remove_watchpoint (CORE_ADDR addr, int len, int type)
{
char *buf = alloca (PBUFSIZ);
char *p;
+ enum Z_packet_type packet = watchpoint_to_Z_packet (type);
+
+ if (remote_protocol_Z[packet].support == PACKET_DISABLE)
+ error ("Can't clear hardware watchpoints without the '%s' (%s) packet\n",
+ remote_protocol_Z[packet].name,
+ remote_protocol_Z[packet].title);
! sprintf (buf, "z%x,", packet);
p = strchr (buf, '\0');
addr = remote_address_masked (addr);
p += hexnumstr (p, (ULONGEST) addr);
sprintf (p, ",%x", len);
putpkt (buf);
getpkt (buf, PBUFSIZ, 0);
! switch (packet_ok (buf, &remote_protocol_Z[packet]))
! {
! case PACKET_ERROR:
! case PACKET_UNKNOWN:
! return -1;
! case PACKET_OK:
! return 0;
! }
! internal_error ("remote_remove_watchpoint: reached end of function");
}
+ /* FIXME: This function should be static and a member of the remote
+ target vector. */
+
int
remote_insert_hw_breakpoint (CORE_ADDR addr, int len)
{
char *buf = alloca (PBUFSIZ);
char *p = buf;
! if (remote_protocol_Z[Z_PACKET_HARDWARE_BP].support == PACKET_DISABLE)
! error ("Can't set hardware breakpoint without the '%s' (%s) packet\n",
! remote_protocol_Z[Z_PACKET_HARDWARE_BP].name,
! remote_protocol_Z[Z_PACKET_HARDWARE_BP].title);
!
*(p++) = 'Z';
*(p++) = '1';
*(p++) = ',';
*************** remote_insert_hw_breakpoint (CORE_ADDR a
*** 4244,4261 ****
putpkt (buf);
getpkt (buf, PBUFSIZ, 0);
! if (buf[0] == '\0' || buf [0] == 'E')
! return -1;
!
! return 0;
}
int
remote_remove_hw_breakpoint (CORE_ADDR addr, int len)
{
char *buf = alloca (PBUFSIZ);
char *p = buf;
*(p++) = 'z';
*(p++) = '1';
*(p++) = ',';
--- 4411,4441 ----
putpkt (buf);
getpkt (buf, PBUFSIZ, 0);
! switch (packet_ok (buf, &remote_protocol_Z[Z_PACKET_HARDWARE_BP]))
! {
! case PACKET_ERROR:
! case PACKET_UNKNOWN:
! return -1;
! case PACKET_OK:
! return 0;
! }
! internal_error ("remote_remove_watchpoint: reached end of function");
}
+ /* FIXME: This function should be static and a member of the remote
+ target vector. */
+
int
remote_remove_hw_breakpoint (CORE_ADDR addr, int len)
{
char *buf = alloca (PBUFSIZ);
char *p = buf;
+ if (remote_protocol_Z[Z_PACKET_HARDWARE_BP].support == PACKET_DISABLE)
+ error ("Can't clear hardware breakpoint without the '%s' (%s) packet\n",
+ remote_protocol_Z[Z_PACKET_HARDWARE_BP].name,
+ remote_protocol_Z[Z_PACKET_HARDWARE_BP].title);
+
*(p++) = 'z';
*(p++) = '1';
*(p++) = ',';
*************** remote_remove_hw_breakpoint (CORE_ADDR a
*** 4267,4278 ****
putpkt(buf);
getpkt (buf, PBUFSIZ, 0);
! if (buf[0] == '\0' || buf [0] == 'E')
! return -1;
!
! return 0;
}
- #endif
/* Some targets are only capable of doing downloads, and afterwards
they switch to the remote serial protocol. This function provides
--- 4447,4462 ----
putpkt(buf);
getpkt (buf, PBUFSIZ, 0);
! switch (packet_ok (buf, &remote_protocol_Z[Z_PACKET_HARDWARE_BP]))
! {
! case PACKET_ERROR:
! case PACKET_UNKNOWN:
! return -1;
! case PACKET_OK:
! return 0;
! }
! internal_error ("remote_remove_watchpoint: reached end of function");
}
/* Some targets are only capable of doing downloads, and afterwards
they switch to the remote serial protocol. This function provides
*************** device is attached to the remote system
*** 4869,4884 ****
push_target (&remote_cisco_ops); /* Switch to using cisco target now */
! init_packet_config (&remote_protocol_P);
! init_packet_config (&remote_protocol_Z);
general_thread = -2;
continue_thread = -2;
- /* Force remote_write_bytes to check whether target supports
- binary downloading. */
- init_packet_config (&remote_protocol_binary_download);
-
/* Probe for ability to use "ThreadInfo" query, as required. */
use_threadinfo_query = 1;
use_threadextra_query = 1;
--- 5053,5063 ----
push_target (&remote_cisco_ops); /* Switch to using cisco target now */
! init_packet_configs ();
general_thread = -2;
continue_thread = -2;
/* Probe for ability to use "ThreadInfo" query, as required. */
use_threadinfo_query = 1;
use_threadextra_query = 1;
*************** in a memory packet.\n",
*** 5432,5439 ****
show_remote_protocol_P_packet_cmd,
&remote_set_cmdlist, &remote_show_cmdlist);
! add_packet_config_cmd (&remote_protocol_Z, "Z", "breakpoint",
! set_remote_protocol_Z_packet_cmd,
! show_remote_protocol_Z_packet_cmd,
&remote_set_cmdlist, &remote_show_cmdlist);
}
--- 5611,5644 ----
show_remote_protocol_P_packet_cmd,
&remote_set_cmdlist, &remote_show_cmdlist);
! add_packet_config_cmd (&remote_protocol_Z[Z_PACKET_SOFTWARE_BP],
! "Z0", "software-breakpoint",
! set_remote_protocol_Z_software_bp_packet_cmd,
! show_remote_protocol_Z_software_bp_packet_cmd,
&remote_set_cmdlist, &remote_show_cmdlist);
+
+ add_packet_config_cmd (&remote_protocol_Z[Z_PACKET_HARDWARE_BP],
+ "Z1", "hardware-breakpoint",
+ set_remote_protocol_Z_hardware_bp_packet_cmd,
+ show_remote_protocol_Z_hardware_bp_packet_cmd,
+ &remote_set_cmdlist, &remote_show_cmdlist);
+
+ add_packet_config_cmd (&remote_protocol_Z[Z_PACKET_WRITE_WP],
+ "Z2", "write-watchpoint",
+ set_remote_protocol_Z_write_wp_packet_cmd,
+ show_remote_protocol_Z_write_wp_packet_cmd,
+ &remote_set_cmdlist, &remote_show_cmdlist);
+
+ add_packet_config_cmd (&remote_protocol_Z[Z_PACKET_READ_WP],
+ "Z3", "read-watchpoint",
+ set_remote_protocol_Z_read_wp_packet_cmd,
+ show_remote_protocol_Z_read_wp_packet_cmd,
+ &remote_set_cmdlist, &remote_show_cmdlist);
+
+ add_packet_config_cmd (&remote_protocol_Z[Z_PACKET_ACCESS_WP],
+ "Z4", "access-watchpoint",
+ set_remote_protocol_Z_access_wp_packet_cmd,
+ show_remote_protocol_Z_access_wp_packet_cmd,
+ &remote_set_cmdlist, &remote_show_cmdlist);
+
}