New memory-tag commands
[deliverable/binutils-gdb.git] / gdbsupport / rsp-low.cc
index eb8f70a305619f1dd93f57b88f19430ab4fa73f5..8900ed4fc04927a873056ff4f0cb80ed904d3585 100644 (file)
 
 /* See rsp-low.h.  */
 
-int
-fromhex (int a)
-{
-  if (a >= '0' && a <= '9')
-    return a - '0';
-  else if (a >= 'a' && a <= 'f')
-    return a - 'a' + 10;
-  else if (a >= 'A' && a <= 'F')
-    return a - 'A' + 10;
-  else
-    error (_("Reply contains invalid hex digit %d"), a);
-}
-
-/* See rsp-low.h.  */
-
 int
 tohex (int nib)
 {
@@ -111,40 +96,6 @@ unpack_varlen_hex (const char *buff,        /* packet to parse */
 
 /* See rsp-low.h.  */
 
-int
-hex2bin (const char *hex, gdb_byte *bin, int count)
-{
-  int i;
-
-  for (i = 0; i < count; i++)
-    {
-      if (hex[0] == 0 || hex[1] == 0)
-       {
-         /* Hex string is short, or of uneven length.
-            Return the count that has been converted so far.  */
-         return i;
-       }
-      *bin++ = fromhex (hex[0]) * 16 + fromhex (hex[1]);
-      hex += 2;
-    }
-  return i;
-}
-
-/* See rsp-low.h.  */
-
-gdb::byte_vector
-hex2bin (const char *hex)
-{
-  size_t bin_len = strlen (hex) / 2;
-  gdb::byte_vector bin (bin_len);
-
-  hex2bin (hex, bin.data (), bin_len);
-
-  return bin;
-}
-
-/* See rsp-low.h.  */
-
 std::string
 hex2str (const char *hex)
 {
This page took 0.025159 seconds and 4 git commands to generate.