NAME
whatis - search symbol table for data or type information
SYNOPSIS
whatis [struct | union | typedef | symbol]
DESCRIPTION
This command displays the definition of structures, unions, typedefs or
text/data symbols.
struct a structure name. The output is the same as if the "struct"
command was used.
union a union name. The output is the same as if the "union" command
was used.
typedef a typedef name. If the typedef translates to a structure or union
the output is the same as if the "struct" or "union" command
was used. If the typedef is a primitive datatype, the one-line
declaration is displayed.
symbol a kernel symbol.
EXAMPLES
Display the definition of a linux_binfmt structure:
crash> whatis linux_binfmt
struct linux_binfmt {
struct linux_binfmt *next;
struct module *module;
int (*load_binary) ();
int (*load_shlib) ();
int (*core_dump) ();
};
Since a kmem_bufctl_t is typedef'd to be a kmem_bufctl_s structure, the
output of the following two commands is identical:
crash> whatis kmem_bufctl_s
struct kmem_bufctl_s {
union {
struct kmem_bufctl_s *buf_nextp;
kmem_slab_t *buf_slabp;
void *buf_objp;
} u;
};
crash> whatis kmem_bufctl_t
struct kmem_bufctl_s {
union {
struct kmem_bufctl_s *buf_nextp;
kmem_slab_t *buf_slabp;
void *buf_objp;
} u;
};
SIZE: 4 (0x4)
Display the type data of sys_read() and jiffies text and data symbols:
crash> whatis sys_read
ssize_t sys_read(unsigned int, char *, size_t);
crash> whatis jiffies
long unsigned int jiffies;
Display definition of a kdev_t typedef:
crash> whatis kdev_t
typedef short unsigned int kdev_t;
SIZE: 2 (0x2)
|