This patch greatly extends the OS information types available to the user using the 'info os' command in Linux. Since the OS info backend is now unified, this information can be obtained from both local and remote (gdbserver) targets. The new information types are: procgroups - Process groups files - File descriptors sockets - Internet-domain sockets shm - Shared memory regions semaphores - Semaphores msg - Message queues modules - Loaded kernel modules They all work in the same manner as the existing 'processes' and 'threads' information types - by pulling the information from the /proc filesystem and formatting it into a table. This facility is tested using a program which creates file descriptors, sockets and IPC structures with specific port numbers/targets, and the test script then looks for these in the output of 'info os'. The documentation is also updated regarding these information types. Kwok Cheung Yeung ChangeLog: gdb/ * common/linux-osdata.c (compare_processes): Auxiliary function for linux_xfer_osdata_processgroups. (linux_xfer_osdata_processgroups): New function to look up process groups. (linux_xfer_osdata_fds): New function to look up file descriptors. (format_socket_state, print_sockets): Auxiliary functions for linux_xfer_osdata_isockets. (union socket_addr): New union used to avoid strict-aliasing problems. (linux_xfer_osdata_isockets): New function to look up internet sockets. (time_from_int, group_from_gid): New convenience functions for converting between data types. (linux_xfer_osdata_shm): New function to look up shared memory for IPC. (linux_xfer_osdata_sem): New function to look up semaphores for IPC. (linux_xfer_osdata_msg): New function to look up message queues for IPC. (linux_xfer_osdata_modules): New function to look up loaded kernel modules. (osdata_table): Add new entries. gdb/doc/ * gdb.texinfo (Operating System Auxilliary Information): Document new 'info os' commands. gdb/testsuite/ * gdb.base/info-os.exp: New test to exercise the 'info os *' commands. * gdb.base/info-os.c: New test program used by info-os.exp.