<HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.51 from /mnt/apple/gdb/source/gdb.apple/source/gdb/gdb/doc/gdbint.texinfo on 23 November 1999 --> <TITLE>GDB Internals - User Interface</TITLE> </HEAD> <BODY> Go to the <A HREF="gdbint_1.html">first</A>, <A HREF="gdbint_3.html">previous</A>, <A HREF="gdbint_5.html">next</A>, <A HREF="gdbint_16.html">last</A> section, <A HREF="gdbint_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC14" HREF="gdbint_toc.html#TOC14">User Interface</A></H1> <P> GDB has several user interfaces. Although the command-line interface is the most common and most familiar, there are others. </P> <H2><A NAME="SEC15" HREF="gdbint_toc.html#TOC15">Command Interpreter</A></H2> <P> The command interpreter in GDB is fairly simple. It is designed to allow for the set of commands to be augmented dynamically, and also has a recursive subcommand capability, where the first argument to a command may itself direct a lookup on a different command list. </P> <P> For instance, the <CODE>set</CODE> command just starts a lookup on the <CODE>setlist</CODE> command list, while <CODE>set thread</CODE> recurses to the <CODE>set_thread_cmd_list</CODE>. </P> <P> To add commands in general, use <CODE>add_cmd</CODE>. <CODE>add_com</CODE> adds to the main command list, and should be used for those commands. The usual place to add commands is in the <CODE>_initialize_<VAR>xyz</VAR></CODE> routines at the ends of most source files. </P> <H2><A NAME="SEC16" HREF="gdbint_toc.html#TOC16">Console Printing</A></H2> <H2><A NAME="SEC17" HREF="gdbint_toc.html#TOC17">TUI</A></H2> <H2><A NAME="SEC18" HREF="gdbint_toc.html#TOC18">libgdb</A></H2> <P> <CODE>libgdb</CODE> was an abortive project of years ago. The theory was to provide an API to GDB's functionality. </P> <P><HR><P> Go to the <A HREF="gdbint_1.html">first</A>, <A HREF="gdbint_3.html">previous</A>, <A HREF="gdbint_5.html">next</A>, <A HREF="gdbint_16.html">last</A> section, <A HREF="gdbint_toc.html">table of contents</A>. </BODY> </HTML>