From 71caed8383ce5ad0277bf0c1feaec40911fc040c Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Thu, 28 Jun 2012 23:44:26 +0000 Subject: * osdata.c (info_osdata_command): Filter out "Title" columns from non-MI uses. * common/linux-osdata.c (struct osdata_type): Add title field. (osdata_table): Add titles to each entry. (linux_command_xfer_osdata): Add a column for title data. * gdb.texinfo (Miscellaneous GDB/MI Commands): Update -info-os example, add note about title column. --- gdb/common/linux-osdata.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'gdb/common') diff --git a/gdb/common/linux-osdata.c b/gdb/common/linux-osdata.c index 1086d10..6488963 100644 --- a/gdb/common/linux-osdata.c +++ b/gdb/common/linux-osdata.c @@ -1543,26 +1543,27 @@ linux_xfer_osdata_modules (gdb_byte *readbuf, struct osdata_type { char *type; + char *title; char *description; LONGEST (*getter) (gdb_byte *readbuf, ULONGEST offset, LONGEST len); } osdata_table[] = { - { "processes", "Listing of all processes", + { "processes", "Processes", "Listing of all processes", linux_xfer_osdata_processes }, - { "procgroups", "Listing of all process groups", + { "procgroups", "Process groups", "Listing of all process groups", linux_xfer_osdata_processgroups }, - { "threads", "Listing of all threads", + { "threads", "Threads", "Listing of all threads", linux_xfer_osdata_threads }, - { "files", "Listing of all file descriptors", + { "files", "File descriptors", "Listing of all file descriptors", linux_xfer_osdata_fds }, - { "sockets", "Listing of all internet-domain sockets", + { "sockets", "Sockets", "Listing of all internet-domain sockets", linux_xfer_osdata_isockets }, - { "shm", "Listing of all shared-memory regions", + { "shm", "Shared-memory regions", "Listing of all shared-memory regions", linux_xfer_osdata_shm }, - { "semaphores", "Listing of all semaphores", + { "semaphores", "Semaphores", "Listing of all semaphores", linux_xfer_osdata_sem }, - { "msg", "Listing of all message queues", + { "msg", "Message queues", "Listing of all message queues", linux_xfer_osdata_msg }, - { "modules", "Listing of all loaded kernel modules", + { "modules", "Kernel modules", "Listing of all loaded kernel modules", linux_xfer_osdata_modules }, { NULL, NULL, NULL } }; @@ -1594,9 +1595,11 @@ linux_common_xfer_osdata (const char *annex, gdb_byte *readbuf, "" "%s" "%s" + "%s" "", osdata_table[i].type, - osdata_table[i].description); + osdata_table[i].description, + osdata_table[i].title); buffer_grow_str0 (&buffer, "\n"); buf = buffer_finish (&buffer); -- cgit v1.1