diff options
author | Stan Shebs <shebs@codesourcery.com> | 2010-06-18 23:06:30 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 2010-06-18 23:06:30 +0000 |
commit | a61408f8aa07c0b9df31474eb4b1277fc63d34ff (patch) | |
tree | fb5a28e9b7889a87eb4f72c13c93d3a5daf3ea95 /gdb/osdata.c | |
parent | 38bd8d09ffe9e298c29172609b358c34cfd7e11b (diff) | |
download | gdb-a61408f8aa07c0b9df31474eb4b1277fc63d34ff.zip gdb-a61408f8aa07c0b9df31474eb4b1277fc63d34ff.tar.gz gdb-a61408f8aa07c0b9df31474eb4b1277fc63d34ff.tar.bz2 |
2010-06-18 Stan Shebs <stan@codesourcery.com>
* osdata.c (get_osdata): Warn separately if target does not report
type list.
(info_osdata_command): Allow empty type, report error if target
does not return available types of OS data.
* linux-nat.c (linux_nat_xfer_osdata): Report list of OS data
types if no annex supplied.
* gdb.texinfo (Operating System Auxiliary Information): Describe
"info os" when no arguments given.
Diffstat (limited to 'gdb/osdata.c')
-rw-r--r-- | gdb/osdata.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gdb/osdata.c b/gdb/osdata.c index 3440b4e..76143bf 100644 --- a/gdb/osdata.c +++ b/gdb/osdata.c @@ -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); |