Hurd: Adjust to changes to "push pruning old threads down to the target"
[deliverable/binutils-gdb.git] / gdb / ui-file.c
index a977f894ef37ad2866645aa6f701ccbd49a50293..31228a301dd56d1aa115d120aede918cb230a6a5 100644 (file)
@@ -356,6 +356,28 @@ ui_file_xstrdup (struct ui_file *file, long *length)
   return acc.buffer;
 }
 
+/* ui_file utility function for converting a ``struct ui_file'' into a
+   std:string.  */
+
+static void
+do_ui_file_as_string (void *context, const char *buffer, long length)
+{
+  std::string *str = (std::string *) context;
+
+  *str = std::string (buffer, length);
+}
+
+/* See ui-file.h.  */
+
+std::string
+ui_file_as_string (struct ui_file *file)
+{
+  std::string str;
+
+  ui_file_put (file, do_ui_file_as_string, &str);
+  return str;
+}
+
 static void
 do_ui_file_obsavestring (void *context, const char *buffer, long length)
 {
This page took 0.025611 seconds and 4 git commands to generate.