Use @defvar to document gdb.pretty_printers
[deliverable/binutils-gdb.git] / gdb / xml-support.c
index 3775e2c8c78863aa0afe6ac4948af6d45342bc59..2b19a000471e7aafca4d1bbff97a54d2fa00b00d 100644 (file)
@@ -1,6 +1,6 @@
 /* Helper routines for parsing XML using Expat.
 
-   Copyright (C) 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,7 +20,7 @@
 #include "defs.h"
 #include "gdbcmd.h"
 #include "xml-support.h"
-#include "filestuff.h"
+#include "common/filestuff.h"
 #include "safe-ctype.h"
 #include <vector>
 #include <string>
@@ -179,16 +179,14 @@ void
 gdb_xml_parser::vdebug (const char *format, va_list ap)
 {
   int line = XML_GetCurrentLineNumber (m_expat_parser);
-  char *message;
 
-  message = xstrvprintf (format, ap);
+  std::string message = string_vprintf (format, ap);
   if (line)
     fprintf_unfiltered (gdb_stderr, "%s (line %d): %s\n",
-                       m_name, line, message);
+                       m_name, line, message.c_str ());
   else
     fprintf_unfiltered (gdb_stderr, "%s: %s\n",
-                       m_name, message);
-  xfree (message);
+                       m_name, message.c_str ());
 }
 
 void
This page took 0.025639 seconds and 4 git commands to generate.