### 25.15 gdb/mi Symbol Query Commands

#### The `-symbol-info-address` Command

##### Synopsis

          -symbol-info-address symbol

Describe where symbol is stored.

##### gdb Command

The corresponding gdb command is ``info address`'.

##### Example

N.A.

#### The `-symbol-info-file` Command

##### Synopsis

          -symbol-info-file

Show the file for the symbol.

##### gdb Command

There's no equivalent gdb command. `gdbtk` has ``gdb_find_file`'.

##### Example

N.A.

#### The `-symbol-info-function` Command

##### Synopsis

          -symbol-info-function

Show which function the symbol lives in.

##### gdb Command

``gdb_get_function`' in `gdbtk`.

##### Example

N.A.

#### The `-symbol-info-line` Command

##### Synopsis

          -symbol-info-line

Show the core addresses of the code for a source line.

##### gdb Command

The corresponding gdb command is ``info line`'. `gdbtk` has the ``gdb_get_line`' and ``gdb_get_file`' commands.

##### Example

N.A.

#### The `-symbol-info-symbol` Command

##### Synopsis

          -symbol-info-symbol addr

Describe what symbol is at location addr.

##### gdb Command

The corresponding gdb command is ``info symbol`'.

##### Example

N.A.

#### The `-symbol-list-functions` Command

##### Synopsis

          -symbol-list-functions

List the functions in the executable.

##### gdb Command

``info functions`' in gdb, ``gdb_listfunc`' and ``gdb_search`' in `gdbtk`.

##### Example

N.A.

#### The `-symbol-list-lines` Command

##### Synopsis

          -symbol-list-lines filename

Print the list of lines that contain code and their associated program addresses for the given source filename. The entries are sorted in ascending PC order.

##### gdb Command

There is no corresponding gdb command.

##### Example

         (gdb)
         -symbol-list-lines basics.c
         ^done,lines=[{pc="0x08048554",line="7"},{pc="0x0804855a",line="8"}]
         (gdb)

#### The `-symbol-list-types` Command

##### Synopsis

          -symbol-list-types

List all the type names.

##### gdb Command

The corresponding commands are ``info types`' in gdb, ``gdb_search`' in `gdbtk`.

##### Example

N.A.

#### The `-symbol-list-variables` Command

##### Synopsis

          -symbol-list-variables

List all the global and static variable names.

##### gdb Command

``info variables`' in gdb, ``gdb_search`' in `gdbtk`.

##### Example

N.A.

#### The `-symbol-locate` Command

##### Synopsis

          -symbol-locate

##### gdb Command

``gdb_loc`' in `gdbtk`.

##### Example

N.A.

#### The `-symbol-type` Command

##### Synopsis

          -symbol-type variable

Show type of variable.

##### gdb Command

The corresponding gdb command is ``ptype`', `gdbtk` has ``gdb_obj_variable`'.

##### Example

N.A.