Add "set remote multiprocess-extensions-packet" command
authorPedro Alves <palves@redhat.com>
Mon, 24 Aug 2015 18:58:31 +0000 (19:58 +0100)
committerPedro Alves <palves@redhat.com>
Mon, 24 Aug 2015 18:58:31 +0000 (19:58 +0100)
Being able to force-disable the RSP multiprocess extensions is useful
for testing.

gdb/ChangeLog:
2015-08-24  Pedro Alves  <palves@redhat.com>

* NEWS (New commands): Mention set/show remote
multiprocess-extensions-packet.
* remote.c (remote_query_supported): Only tell the server to use
the multiprocess extensions if the user hasn't force-disabled them
with "set remote multiprocess-extensions-packet off".

gdb/doc/ChangeLog:
2015-08-24  Pedro Alves  <palves@redhat.com>

* gdb.texinfo (Remote Configuration): Document the "set/show
remote multiprocess-extensions-packet" commands.

gdb/ChangeLog
gdb/NEWS
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/remote.c

index ac65a2186ae1d4e557152b03d0d1972078543702..7ffc61b0ebf6ee32efe1cf0f2d4a60b26284f61e 100644 (file)
@@ -1,3 +1,11 @@
+2015-08-24  Pedro Alves  <palves@redhat.com>
+
+       * NEWS (New commands): Mention set/show remote
+       multiprocess-extensions-packet.
+       * remote.c (remote_query_supported): Only tell the server to use
+       the multiprocess extensions if the user hasn't force-disabled them
+       with "set remote multiprocess-extensions-packet off".
+
 2015-08-24  Pedro Alves  <palves@redhat.com>
 
        * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
index 9edfd5e1bdffc12efe631e5023203cf08ff1f4cb..49c4a11f1566e2e2671c7813b952b2e4947563c4 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -28,6 +28,10 @@ set debug bfd-cache
 show debug bfd-cache
   Control display of debugging info regarding bfd caching.
 
+set remote multiprocess-extensions-packet
+show remote multiprocess-extensions-packet
+  Set/show the use of the remote protocol multiprocess extensions.
+
 * The "disassemble" command accepts a new modifier: /s.
   It prints mixed source+disassembly like /m with two differences:
   - disassembled instructions are now printed in program order, and
index 2fc5fd07e7cf908abe911dcbd218ff84d4ce629b..29c66b8eee12770643afebff7fc7aa47f9a8214e 100644 (file)
@@ -1,3 +1,8 @@
+2015-08-24  Pedro Alves  <palves@redhat.com>
+
+       * gdb.texinfo (Remote Configuration): Document the "set/show
+       remote multiprocess-extensions-packet" commands.
+
 2015-08-24  Pedro Alves  <palves@redhat.com>
 
        * gdb.texinfo (Embedded Processors) <ARM>: Remove references to RDI.
index 5dfb14be405816e742ecbd3681ae189d3627d9eb..cd0abad9bb116807bd9864472a4666f1fcb1a353 100644 (file)
@@ -20205,6 +20205,10 @@ are:
 @tab @code{Z0 and Z1}
 @tab @code{Support for target-side breakpoint condition evaluation}
 
+@item @code{multiprocess-extensions}
+@tab @code{multiprocess extensions}
+@tab Debug multiple processes and remote process PID awareness
+
 @item @code{swbreak-feature}
 @tab @code{swbreak stop reason}
 @tab @code{break}
index 48a4f7d894c2cb3476e15b41fa46083cba89e8b4..f2968ebdb275db5663d5cfe3289706ff87ab200c 100644 (file)
@@ -4352,7 +4352,8 @@ remote_query_supported (void)
       char *q = NULL;
       struct cleanup *old_chain = make_cleanup (free_current_contents, &q);
 
-      q = remote_query_supported_append (q, "multiprocess+");
+      if (packet_set_cmd_state (PACKET_multiprocess_feature) != AUTO_BOOLEAN_FALSE)
+       q = remote_query_supported_append (q, "multiprocess+");
 
       if (packet_set_cmd_state (PACKET_swbreak_feature) != AUTO_BOOLEAN_FALSE)
        q = remote_query_supported_append (q, "swbreak+");
@@ -13231,6 +13232,9 @@ Show the maximum size of the address (in bits) in a memory packet."), NULL,
   add_packet_config_cmd (&remote_protocol_packets[PACKET_Qbtrace_conf_bts_size],
        "Qbtrace-conf:bts:size", "btrace-conf-bts-size", 0);
 
+  add_packet_config_cmd (&remote_protocol_packets[PACKET_multiprocess_feature],
+       "multiprocess-feature", "multiprocess-feature", 0);
+
   add_packet_config_cmd (&remote_protocol_packets[PACKET_swbreak_feature],
                          "swbreak-feature", "swbreak-feature", 0);
 
@@ -13260,7 +13264,6 @@ Show the maximum size of the address (in bits) in a memory packet."), NULL,
        switch (i)
          {
          case PACKET_QNonStop:
-         case PACKET_multiprocess_feature:
          case PACKET_EnableDisableTracepoints_feature:
          case PACKET_tracenz_feature:
          case PACKET_DisconnectedTracing_feature: