Add "objfile" parameter to two partial_symtab methods
[deliverable/binutils-gdb.git] / gdb / osdata.c
index 5c41cb1374c8823d37d0970347a85cfc17be7ae1..9b060475212924d7923ac429d471bb57bb690b3c 100644 (file)
@@ -1,6 +1,6 @@
 /* Routines for handling XML generic OS data provided by target.
 
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,7 +19,6 @@
 
 #include "defs.h"
 #include "target.h"
-#include "vec.h"
 #include "xml-support.h"
 #include "osdata.h"
 #include "ui-out.h"
@@ -163,11 +162,11 @@ std::unique_ptr<osdata>
 get_osdata (const char *type)
 {
   std::unique_ptr<osdata> osdata;
-  gdb::unique_xmalloc_ptr<char> xml = target_get_osdata (type);
+  gdb::optional<gdb::char_vector> xml = target_get_osdata (type);
 
   if (xml)
     {
-      if (xml.get ()[0] == '\0')
+      if ((*xml)[0] == '\0')
        {
          if (type)
            warning (_("Empty data returned by target.  Wrong osdata type?"));
@@ -175,7 +174,7 @@ get_osdata (const char *type)
            warning (_("Empty type list returned by target.  No type data?"));
        }
       else
-       osdata = osdata_parse (xml.get ());
+       osdata = osdata_parse (xml->data ());
     }
 
   if (osdata == NULL)
@@ -290,8 +289,9 @@ info_osdata_command (const char *arg, int from_tty)
   info_osdata (arg);
 }
 
+void _initialize_osdata ();
 void
-_initialize_osdata (void)
+_initialize_osdata ()
 {
   add_info ("os", info_osdata_command,
            _("Show OS data ARG."));
This page took 0.02628 seconds and 4 git commands to generate.