]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/osdata.c
2010-06-18 Stan Shebs <stan@codesourcery.com>
[thirdparty/binutils-gdb.git] / gdb / osdata.c
index 3440b4e9631caedb409d94783f20511a50d4cd36..76143bf8edd035e914d8877ceea3a3fc68421637 100644 (file)
@@ -256,7 +256,12 @@ get_osdata (const char *type)
       struct cleanup *old_chain = make_cleanup (xfree, xml);
 
       if (xml[0] == '\0')
-       warning (_("Empty data returned by target.  Wrong osdata type?"));
+       {
+         if (type)
+           warning (_("Empty data returned by target.  Wrong osdata type?"));
+         else
+           warning (_("Empty type list returned by target.  No type data?"));
+       }
       else
        osdata = osdata_parse (xml);
 
@@ -294,15 +299,14 @@ info_osdata_command (char *type, int from_tty)
   int ncols;
   int nprocs;
 
-  if (type == 0)
-    /* TODO: No type could mean "list availables types".  */
-    error (_("Argument required."));
-
   osdata = get_osdata (type);
   old_chain = make_cleanup_osdata_free (osdata);
 
   nprocs = VEC_length (osdata_item_s, osdata->items);
 
+  if (!type && nprocs == 0)
+    error (_("Available types of OS data not reported."));
+
   last = VEC_last (osdata_item_s, osdata->items);
   if (last && last->columns)
     ncols = VEC_length (osdata_column_s, last->columns);