Chapter 15.Examining the Symbol TableThe commands described in this chapter allow you to inquire about the symbols (names of variables,functions and types) defined in your program. This information is inherent in the text of your programand does not change as your program executes. gdb finds it in your program’s symbol table, in thefile indicated when you started gdb (refer to Section 4.1.1 Choosing files), or by one of the file-management commands (refer to Section 17.1 Commands to specify files).Occasionally, you may need to refer to symbols that contain unusual characters, which gdb ordinarilytreats as word delimiters. The most frequent case is in referring to static variables in other sourcefiles (refer to Section 10.2 Program variables). File names are recorded in object files as debuggingsymbols, but gdb would ordinarily parse a typical file name, like foo.c, as the three words foo . c.To allow gdb to recognize foo.c as a single symbol, enclose it in single quotes; for example,p ’foo.c’::xlooks up the value of x in the scope of the file foo.c.info address symbolDescribe where the data for symbol is stored. For a register variable, this says which register itis kept in. For a non-register local variable, this prints the stack-frame offset at which the variableis always stored.Note the contrast with print &symbol, which does not work at all for a register variable, andfor a stack local variable prints the exact address of the current instantiation of the variable.info symbol addrPrint the name of a symbol which is stored at the address addr. If no symbol is stored exactly ataddr, gdb prints the nearest symbol and an offset from it:(gdb) info symbol 0x54320_initialize_vx + 396 in section .textThis is the opposite of the info address command. You can use it to find out the name of avariable or a function given its address.whatis exprPrint the data type of expression expr. expr is not actually evaluated, and any side-effectingoperations (such as assignments or function calls) inside it do not take place. Refer to Section10.1 Expressions.whatisPrint the data type of $, the last value in the value history.ptype typenamePrint a description of data type typename. typename may be the name of a type, or for C codeit may have the form class class-name, struct struct-tag, union union-tag or enumenum-tag.