Next: Memory Region Attributes, Previous: Vector Unit, Up: Data
gdb provides interfaces to useful OS facilities that can help you debug your program.
When gdb runs on a Posix system (such as GNU or Unix
machines), it interfaces with the inferior via the ptrace
system call. The operating system creates a special sata structure,
called struct user
, for this interface. You can use the
command info udot
to display the contents of this data
structure.
info udot
struct user
maintained by the OS
kernel for the program being debugged. gdb displays the
contents of struct user
as a list of hex numbers, similar to
the examine
command.
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.
info auxv
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.
info os
info os processes