gdb.info: GDB/MI Miscellaneous Commands

Go forward to GDB/MI Stack Manipulation
Go backward to GDB/MI Program Control
Go up to GDB/MI
Go to the top op gdb

Miscellaneous GDB commands in GDB/MI

The `-gdb-exit' Command

Synopsis

      -gdb-exit
   Exit GDB immediately.

GDB Command

Approximately corresponds to `quit'.

Example

(gdb) -gdb-exit

The `-gdb-set' Command

Synopsis

      -gdb-set
   Set an internal GDB variable.

GDB Command

The corresponding GDB command is `set'.

Example

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

The `-gdb-show' Command

Synopsis

      -gdb-show
   Show the current value of a GDB variable.

GDB command

The corresponding GDB command is `show'.

Example

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

The `-gdb-version' Command

Synopsis

      -gdb-version
   Show version information for GDB.  Used mostly in testing.

GDB Command

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

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)

The `-interpreter-exec' Command

Synopsis

     -interpreter-exec INTERPRETER COMMAND
   Execute the specified COMMAND in the given INTERPRETER.

GDB Command

The corresponding GDB command is `interpreter-exec'.

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)