10.15 Operating System Auxiliary Information
When gdb runs on a Posix system (such as GNU or Unix
machines), it interfaces with the inferior via the
system call. The operating system creates a special sata structure,
struct user, for this interface. You can use the
info udot to display the contents of this data
- Display the contents of the
struct usermaintained by the OS kernel for the program being debugged. gdb displays the contents of
struct useras a list of hex numbers, similar to the
Some operating systems supply an auxiliary vector to programs at startup. This is akin to the arguments and environment that you specify for a program, but contains a system-dependent variety of binary values that tell system libraries important details about the hardware, operating system, and process. Each value's purpose is identified by an integer tag; the meanings are well-known but system-specific. Depending on the configuration and operating system facilities, gdb may be able to show you this information. For remote targets, this functionality may further depend on the remote stub's support of the qXfer:auxv:read packet, see qXfer auxiliary vector read.
- Display the auxiliary vector of the inferior, which can be either a live process or a core dump file. gdb prints each tag value numerically, and also shows names and text descriptions for recognized tags. Some values in the vector are numbers, some bit masks, and some pointers to strings or other data. gdb displays each value in the most appropriate form for a recognized tag, and in hexadecimal for an unrecognized tag.
On some targets, gdb can access operating-system-specific information and display it to user, without interpretation. For remote targets, this functionality depends on the remote stub's support of the qXfer:osdata:read packet, see qXfer osdata read.
- List the types of OS information available for the target. If the target does not return a list of possible types, this command will report an error.
info os processes
- Display the list of processes on the target. For each process, gdb prints the process identifier, the name of the user, and the command corresponding to the process.