New python attribute gdb.Objfile.build_id.
[deliverable/binutils-gdb.git] / gdb / utils.c
index 1f5f4f4b6f3df50f24333fb7c1d7d40657d07ed7..1ab183c2ce7f3c9adb2c2e679134648991c9773e 100644 (file)
@@ -1112,6 +1112,23 @@ gdb_print_host_address (const void *addr, struct ui_file *stream)
 {
   fprintf_filtered (stream, "%s", host_address_to_string (addr));
 }
+
+/* See utils.h.  */
+
+char *
+make_hex_string (const gdb_byte *data, size_t length)
+{
+  char *result = xmalloc (length * 2 + 1);
+  char *p;
+  size_t i;
+
+  p = result;
+  for (i = 0; i < length; ++i)
+    p += sprintf (p, "%02x", data[i]);
+  *p = '\0';
+  return result;
+}
+
 \f
 
 /* A cleanup function that calls regfree.  */
This page took 0.022972 seconds and 4 git commands to generate.