diff --git a/gdb/NEWS b/gdb/NEWS
index 0aac7a7b13a..2d54b64586b 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -73,6 +73,14 @@ binary-upload in qSupported reply
   stub doesn't report this feature supported, then GDB will not use
   the 'x' packet.
 
+e
+  Fetch the "expedited" registers from the remote target.  These are
+  the registers that are deemed the most important by the target and
+  are typically the same as those sent in a 'T' stop reply packet.
+  The 'e' packet can be an alternative to the 'g' packet to reduce
+  the transfer overhead between GDB and the remote target when the
+  complete register file of a thread is large.
+
 * Changed remote packets
 
 qXfer:threads:read
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 473431011d1..b86bfd17fc8 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -43125,6 +43125,30 @@ Reply:
 for success
 @end table
 
+@item e
+@anchor{read expedited registers packet}
+@cindex @samp{e} packet
+Read expedited registers.
+
+Reply:
+@table @samp
+@item @var{n1}:@var{r1};@var{n2}:@var{r2};@dots{}
+The reply contains a list of @samp{@var{n}:@var{r}} pairs, where each
+pair carries the value @var{r} for the register numbered @var{n},
+where @var{n} is a hexadecimal number.  The corresponding @var{r}
+gives the register's value as a series of bytes in target byte order,
+with each byte given by a two-digit hex number.
+@end table
+
+The registers sent by the remote target are those that are deemed
+important (e.g.@: most frequently accessed) registers.  The list is
+determined by the target and is typically the same as the list sent in
+a stop reply packet.  @xref{Stop Reply Packets}.
+
+The @samp{e} packet can be an alternative to the @samp{g} packet to
+reduce the transfer overhead between @value{GDBN} and the remote
+target when the complete register file of a thread is large.
+
 @item F @var{RC},@var{EE},@var{CF};@var{XX}
 @cindex @samp{F} packet
 A reply from @value{GDBN} to an @samp{F} packet sent by the target.
diff --git a/gdb/remote.c b/gdb/remote.c
index 66c58c884d3..f9d9325da23 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -236,6 +236,7 @@ enum {
   PACKET_qSymbol,
   PACKET_P,
   PACKET_p,
+  PACKET_e,
   PACKET_Z0,
   PACKET_Z1,
   PACKET_Z2,
@@ -466,6 +467,7 @@ struct packet_reg
   long regnum; /* GDB's internal register number.  */
   LONGEST pnum; /* Remote protocol register number.  */
   bool in_g_packet; /* Always part of G packet.  */
+  bool in_e_packet; /* Part of the E packet (expedited registers).  */
   /* long size in bytes;  == register_size (arch, regnum);
      at present.  */
   /* char *name; == gdbarch_register_name (arch, regnum);
@@ -1321,6 +1323,9 @@ class remote_target : public process_stratum_target
   int send_g_packet ();
   void process_g_packet (struct regcache *regcache);
   void fetch_registers_using_g (struct regcache *regcache);
+
+  void fetch_registers_using_e (regcache *regcache);
+
   int store_register_using_P (const struct regcache *regcache,
 			      packet_reg *reg);
   void store_registers_using_G (const struct regcache *regcache);
@@ -8240,6 +8245,7 @@ Packet: '%s'\n"),
 			   hex_string (pnum), p, buf);
 
 		  int reg_size = register_size (event->arch, reg->regnum);
+		  reg->in_e_packet = true;
 		  cached_reg.num = reg->regnum;
 		  cached_reg.data.resize (reg_size);
 
@@ -9081,6 +9087,89 @@ remote_target::fetch_registers_using_g (struct regcache *regcache)
   process_g_packet (regcache);
 }
 
+/* Fetch the expedited registers.  */
+
+void
+remote_target::fetch_registers_using_e (regcache *regcache)
+{
+  if (m_features.packet_support (PACKET_e) == PACKET_DISABLE)
+    return;
+
+  remote_state *rs = get_remote_state ();
+
+  char *wbuf = rs->buf.data ();
+  wbuf[0] = 'e';
+  wbuf[1] = '\0';
+
+  putpkt (rs->buf);
+  getpkt (&rs->buf, 0);
+
+  packet_result result = m_features.packet_ok (rs->buf, PACKET_e);
+  switch (result.status ())
+    {
+    case PACKET_OK:
+      break;
+    case PACKET_UNKNOWN:
+    case PACKET_ERROR:
+      /* We do not raise an error here, so that we try 'g'
+	 and 'p' further.  */
+      return;
+    }
+
+  gdbarch *gdbarch = regcache->arch ();
+  remote_arch_state *rsa = rs->get_remote_arch_state (gdbarch);
+  const char *buf = rs->buf.data ();
+
+  while (*buf != '\0')
+    {
+      /* Parse a register value.  The format is 'n...:r...;', where
+	 n... = register number
+	 r... = register contents.  */
+      const char *buf_col = strchr (buf, ':');
+      if ((buf_col == nullptr) || (buf_col == buf))
+	error (_("Remote response is badly formatted: %s"
+		 "\nhere: %s"), rs->buf.data (), buf);
+
+      ULONGEST pnum;
+      const char *buf_temp = unpack_varlen_hex (buf, &pnum);
+      if (buf_temp != buf_col)
+	{
+	  /* Not a number.  */
+	  error (_("Remote response does not contain a number at: %s"),
+		 buf);
+	}
+
+      packet_reg *reg = packet_reg_from_pnum (gdbarch, rsa, pnum);
+      if (reg == nullptr)
+	error (_("Remote sent bad register number %s at %s"),
+	       hex_string (pnum), buf);
+
+      reg->in_e_packet = true;
+
+      int reg_size = register_size (gdbarch, reg->regnum);
+      buf = buf_temp + 1;
+      if (*buf == 'x')
+	regcache->raw_supply (reg->regnum, nullptr);
+      else
+	{
+	  std::vector<gdb_byte> value;
+	  value.reserve (reg_size);
+
+	  int data_size = hex2bin (buf, value.data (), reg_size);
+	  if (data_size < reg_size)
+	    error (_("Remote reply is too short: %s"), buf);
+
+	  regcache->raw_supply (reg->regnum, value.data ());
+	}
+
+      buf += 2 * reg_size;
+      if (*buf != ';')
+	error (_("Remote response does not contain a ';' at %s"), buf);
+
+      buf++;
+    }
+}
+
 /* Make the remote selected traceframe match GDB's selected
    traceframe.  */
 
@@ -9121,7 +9210,17 @@ remote_target::fetch_registers (struct regcache *regcache, int regnum)
 
       gdb_assert (reg != NULL);
 
-      /* If this register might be in the 'g' packet, try that first -
+      /* If we believe this register is included in an 'e' packet, try
+	 it first.  */
+      if (reg->in_e_packet)
+	{
+	  reg->in_e_packet = false;
+	  fetch_registers_using_e (regcache);
+	  if (reg->in_e_packet)
+	    return;
+	}
+
+      /* If this register might be in the 'g' packet, try that next;
 	 we are likely to read more than one register.  If this is the
 	 first 'g' packet, we might be overly optimistic about its
 	 contents, so fall back to 'p'.  */
@@ -16338,6 +16437,8 @@ Show the maximum size of the address (in bits) in a memory packet."), NULL,
 
   add_packet_config_cmd (PACKET_p, "p", "fetch-register", 1);
 
+  add_packet_config_cmd (PACKET_e, "e", "fetch-expedited-registers", 1);
+
   add_packet_config_cmd (PACKET_Z0, "Z0", "software-breakpoint", 0);
 
   add_packet_config_cmd (PACKET_Z1, "Z1", "hardware-breakpoint", 0);
diff --git a/gdbserver/remote-utils.cc b/gdbserver/remote-utils.cc
index 67225c50f81..7a1dc4aaadb 100644
--- a/gdbserver/remote-utils.cc
+++ b/gdbserver/remote-utils.cc
@@ -1295,6 +1295,20 @@ prepare_resume_reply (char *buf, ptid_t ptid, const target_waitstatus &status)
 
 /* See remote-utils.h.  */
 
+void
+output_expedite_registers (char *buf)
+{
+  regcache *regcache = get_thread_regcache (current_thread);
+
+  for (const std::string &expedited_reg : regcache->tdesc->expedite_regs)
+    buf = outreg (regcache, find_regno (regcache->tdesc,
+					expedited_reg.c_str ()), buf);
+
+  *buf = '\0';
+}
+
+/* See remote-utils.h.  */
+
 const char *
 decode_m_packet_params (const char *from, CORE_ADDR *mem_addr_ptr,
 			unsigned int *len_ptr, const char end_marker)
diff --git a/gdbserver/remote-utils.h b/gdbserver/remote-utils.h
index 65ce604f9dc..dd939240a01 100644
--- a/gdbserver/remote-utils.h
+++ b/gdbserver/remote-utils.h
@@ -43,6 +43,10 @@ void check_remote_input_interrupt_request (void);
 void prepare_resume_reply (char *buf, ptid_t ptid,
 			   const target_waitstatus &status);
 
+/* Output the expedited registers of the current thread into BUF
+   as a list of 'regno:value;' pairs.  */
+void output_expedite_registers (char *buf);
+
 const char *decode_address_to_semicolon (CORE_ADDR *addrp, const char *start);
 void decode_address (CORE_ADDR *addrp, const char *start, int len);
 
diff --git a/gdbserver/server.cc b/gdbserver/server.cc
index def01c1ee80..880cc9ffc13 100644
--- a/gdbserver/server.cc
+++ b/gdbserver/server.cc
@@ -4677,6 +4677,21 @@ process_serial_event (void)
 	  cs.own_buf[0] = '\0';
 	}
       break;
+    case 'e':
+      require_running_or_break (cs.own_buf);
+      if (cs.current_traceframe >= 0)
+	{
+	  /* This packet is not supported in this mode.  */
+	  write_enn (cs.own_buf);
+	}
+      else
+	{
+	  if (!set_desired_thread ())
+	    write_enn (cs.own_buf);
+	  else
+	    output_expedite_registers (cs.own_buf);
+	}
+      break;
     case 'g':
       require_running_or_break (cs.own_buf);
       if (cs.current_traceframe >= 0)
