26.12. Miscellaneous gdb commands in gdb/mi

26.12.1. The -gdb-exitCommand

26.12.1.1. Synopsis

 -gdb-exit

Exit gdb immediately.

26.12.1.2. gdb Command

Approximately corresponds to quit.

26.12.1.3. Example

(gdb)
-gdb-exit

26.12.2. The -gdb-setCommand

26.12.2.1. Synopsis

 -gdb-set

Set an internal gdb variable.

26.12.2.2. gdb Command

The corresponding gdb command is set.

26.12.2.3. Example

(gdb)
-gdb-set $foo=3
^done
(gdb)

26.12.3. The -gdb-showCommand

26.12.3.1. Synopsis

 -gdb-show

Show the current value of a gdb variable.

26.12.3.2. gdb command

The corresponding gdb command is show.

26.12.3.3. Example

(gdb)
-gdb-show annotate
^done,value="0"
(gdb)

26.12.4. The -gdb-versionCommand

26.12.4.1. Synopsis

 -gdb-version

Show version information for gdb. Used mostly in testing.

26.12.4.2. gdb Command

There's no equivalent gdb command. gdb by default shows this information when you start an interactive session.

26.12.4.3. Example

(gdb)
-gdb-version
~GNU gdb 5.2.1
~Copyright 2000 Free Software Foundation, Inc.
~GDB is free software, covered by the GNU General Public License, and
~you are welcome to change it and/or distribute copies of it under
~ certain conditions.
~Type "show copying" to see the conditions.
~There is absolutely no warranty for GDB.  Type "show warranty" for
~ details.
~This GDB was configured as
 "--host=sparc-sun-solaris2.5.1 --target=ppc-eabi".
^done
(gdb)

26.12.5. The -interpreter-execCommand

26.12.6. Synopsis

-interpreter-exec interpreter command

Execute the specified command in the given interpreter.

26.12.7. gdb Command

The corresponding gdb command is interpreter-exec.

26.12.8. Example

(gdb)
-interpreter-exec console "break main"
&"During symbol reading, couldn't parse type; debugger out of date?.\n"
&"During symbol reading, bad structure-type format.\n"
~"Breakpoint 1 at 0x8074fc6: file ../../src/gdb/main.c, line 743.\n"
^done
(gdb)