This manual is for GNU TGDB (version 0.1.0, 16 January 2022), the GNU ncurses based front end to GDB.
Copyright © 2019 TGDB Team
This document is part of a free software program; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA
| • Summary: | Summary of TGDB | |
| • Invocation: | Getting in and out of TGDB | |
| • Understanding TGDB: | Understanding the core concepts of TGDB | |
| • Controlling TGDB: | TGDB commands | |
| • Configuring TGDB: | TGDB configuration commands | |
| • Highlighting Groups: | TGDB highlighting groups | |
| • Key User Interface: | TGDB key user interface | |
| • Terminal Control Flow: | Allowing terminal control flow in TGDB | |
| • Building TGDB: | Building TGDB from source | |
| • Copying This Manual: | ||
| • Index: | ||
Next: Invocation, Previous: Top, Up: Top [Contents][Index]
TGDB is a curses-based interface to the GNU Debugger (GDB). The goal of TGDB is to be lightweight and responsive; not encumbered with unnecessary features. TGDB diverges from CGDB, this document is generated mainly by substitute cgdb to tgdb.
The interface is designed to deliver the familiar GDB text interface, with a split screen showing the source as it executes. The UI is modeled on the classic Unix text editor, vi. Those familiar with vi should feel right at home using TGDB.
The library responsible for communicating with GDB is called gdbwire. Those wanting to develop other interfaces to GDB are welcome to use gdbwire as the basis for their program. Many of the headaches of parsing GDB’s output and annotations can be avoided by using it.
Some features offered by TGDB are:
Next: Understanding TGDB, Previous: Summary, Up: Top [Contents][Index]
This chapter discusses how to start TGDB, and how to get out of it. The essentials are:
Next: Controlling TGDB, Previous: Invocation, Up: Top [Contents][Index]
The TGDB user interface currently consists of two windows and a status bar. The source window is currently on the top and the GDB window is on the bottom. The status bar currently separates the two windows.
The interface has several modes depending on which window is focused. TGDB mode is when the source window is focused and GDB mode is when the GDB window is focused.
Beginning with TGDB version 1.0, the windows are movable, and the user will be able to create as many or as few that is desired. Currently however, all of my time is spent developing the interface between TGDB and GDB. Once this is complete, the UI of TGDB will become much more polished. If you are a ncurses developer, and have spare time to work on this task, please contact me.
| • Source Window: | Understanding the source window. | |
| • GDB Window: | Understanding the GDB window. | |
| • File Dialog Window: | Understanding the file dialog window. | |
| • Status Bar: | Understanding the status bar. | |
| • Switching Windows: | Switching between windows. |
Next: GDB Window, Up: Understanding TGDB [Contents][Index]
The source window is the window that provides you a view of the source
code that the debugged program is made up of. It will display to the user a
single source file at a time. While the user is debugging, via next
and step, TGDB will update the source file and line number to keep you
informed as to where GDB is debugging.
TGDB has several features that make debugging easier than using plain old GDB. One feature you will notice right away while debugging a C, C++ or ADA program, is that the source files are syntax highlighted. This allows the user to easily navigate through the source file to look for certain places in the source code. If you would like to see another source language highlighted, contact us. To understanding how to navigate through the source window look at the commands in TGDB Mode.
In addition to showing the source code, TGDB also displays to the user the
currently executing line. The line number will be highlighted green, to
represent that the particular line, is the current line being debugged by GDB.
Also, TGDB will display an arrow extending from the line number, to the
source line. You can configure what type of display TGDB uses with the
:set executinglinedisplay configuration option. By default,
the longarrow display is used.
As you navigate through the source window, the current line the cursor is
on will be highlighted with a block. This simply helps you keep track of
where you are in the file. You can configure what type of display TGDB uses
with the :set selectedlinedisplay configuration option. By deafult,
the block display is used.
Also, you can set or delete breakpoints in TGDB from the source window. Simply navigate to the line that you are interested in setting a breakpoint, and hit the space bar. This will set a breakpoint on the line if one did not already exist. The line number should turn red to indicate that a breakpoint has been set. Hitting the space bar again will delete the breakpoint. If you disable the breakpoint, the line number will turn yellow, to represent the disabled breakpoint.
TGDB also supports regular expression searching within the source window. If you type / or ? you can search in the source window for a string of interest. The C library regular expression functions are used to perform this search, which honors things like ‘*’ or ‘+’.
The full list of commands that are available in the source window is in TGDB Mode.
In addition to the source and GDB windows, TGDB’s workspace can host several auxiliary panes:
Local variables of the current frame, expanded as a tree.
Call stack of the current thread.
List of threads in the inferior.
CPU registers, grouped by category.
User-supplied expressions added with :evaluate; each is re-evaluated automatically on every GDB stop.
Hex/ASCII (or binary / octal / decimal) dump of a region of memory,
populated with :memory addr. The Memory pane is
multi-instance — the workspace can hold any number of
them simultaneously, and each is refreshed on every GDB stop. Rendering
is fully pluggable through the :set memoryformatter=...
option (see Configuring TGDB).
Disassembly of the current function, primed automatically on
creation (main when the program has not started).
Independent of the inline :disasm mode in the source pane.
Right-click anywhere in the workspace to open the cascading context menu. Its Add sub-menu lists all panes that can still be added (panes that are already mounted are hidden, except the multi-instance Memory pane which can always be added again). Split, Hide, and orientation toggles operate on the pane under the cursor.
Next: File Dialog Window, Previous: Source Window, Up: Understanding TGDB [Contents][Index]
The GDB window is how TGDB allows the user to interface with the GNU debugger. If you wish to pass a command to GDB, simply type it into this window and GDB will receive the command. This interface is intended to be 100% identical to using GDB on a terminal.
There is a limited set of keys that can be typed into this window that TGDB interprets and handles, instead of sending to GDB. They are all available in GDB Mode.
TGDB attempts to buffer commands the same way they would be if you typed them at the terminal. So, if you type several commands before a single one finishes, they will each be run in order. There will be no way to stop these commands from being run besides from typing Ctrl-C, like you would at any normal terminal when working with GDB.
TGDB also supports regular expression searching within the GDB window.
Next: Status Bar, Previous: GDB Window, Up: Understanding TGDB [Contents][Index]
The file dialog window is available to help the user view and select which file they would like to view. It provides the user with a list of all the files that make up the program being debugged. If there are no files available, because there is no program being debugged or because there is no debug symbols, then the file dialog will not open and a message will be displayed at the status bar.
You can get to the file dialog by hitting o when you are at the source
window. Once you enter the file dialog, it is possible to leave it by hitting
q. You can navigate the file dialog using the standard direction keys
and you can even use regular expression to find your file. This can save a
lot of time as the number of files grow.
The full list of commands that are available in the source window is in File Dialog Mode.
Next: Switching Windows, Previous: File Dialog Window, Up: Understanding TGDB [Contents][Index]
The command-line bar is the general purpose way for TGDB to show the user which commands they are currently typing or report errors to the user when they occur. TGDB does not use popup’s or other forms of I/O to alert the user of information or problems.
While TGDB is running, you can configure it with any of the commands that
are valid in TGDB’s configuration file. Simply type : in the source
window, and you will see the colon, and the rest of the command you type
appear in the command-line bar. When you are finished typing the command that
you are interested in, type enter. This will alert TGDB to execute
the command. If at any point you would like to cancel the current
command typed so far, type the tgdb mode key. This will put you back
into TGDB mode. For a description of the tgdb mode key, see
Switching Windows.
The full list of commands that are available in the source window is in Configuring TGDB.
Previous: Status Bar, Up: Understanding TGDB [Contents][Index]
When TGDB is invoked, the interface is in GDB mode. A ‘*’ at the right of the status bar indicates that input will be passed to GDB. To change the focus to the source window, hit the ESC key. The tgdb mode key is the key that is responsible for switching the user into TGDB mode from a different mode. The tgdb mode key is defaulted to the ESC key. To change this value, look at the configuration options for TGDB. See Configuring TGDB.
The interface is now in TGDB mode. To switch back into GDB mode, press i. This syntax is based on the popular Unix text-editor, vi.
Next: Configuring TGDB, Previous: Understanding TGDB, Up: Top [Contents][Index]
TGDB can be controlled in a variety of different ways. Each mode that TGDB is in acts differently. Currently TGDB implicitly changes modes depending on which window is active. The following information will help you determine what commands are accessible during which modes.
| • TGDB Mode: | Commands available during TGDB mode | |
| • GDB Mode: | Commands available during GDB mode | |
| • File Dialog Mode: | Commands available during the file dialog mode |
Next: GDB Mode, Up: Controlling TGDB [Contents][Index]
When you are in the source window, you are implicitly in TGDB mode. All of the below commands are available during this mode. This mode is primarily available for the user to view the current source file, search it, or switch to a different mode.
Puts the user into command mode. However, you are already in this mode. This is defaulted to the ESC key.
Puts the user into GDB mode.
Puts the user into scroll mode in the GDB mode.
Opens a new tty for the debugged program.
Toggle the window orientation (horizontal <-> vertical).
Move up a line or up ‘<number>’ lines.
Move down a line or down ‘<number>’ lines.
Move left a line.
Move right a line.
Move up a page.
Move up 1/2 a page.
Move down a page.
Move down 1/2 a page.
Move to the top of file.
Move to the bottom of file or to a line number within the file.
Set a mark at the cursor position. A lower case letter sets a local mark that is valid within one file. An upper case letter sets a global mark valid between files. If there are ten files, each file can have a mark ‘a’, but only one can have a mark ‘A’.
Jump to the corresponding local or global mark.
Jump to the last jump location.
Jump to the currently executing line.
search from current cursor position.
reverse search from current cursor position.
next forward search.
next reverse search.
open the file dialog.
Sets a breakpoint at the current line number.
Sets a temporary breakpoint at the current line number.
Shrink source window 1 line or column (depending on split orientation).
Grow source window 1 line or column (depending on split orientation).
Shrink source window 25%
Grow source window 25%
Clear and redraw the screen.
Send a run command to GDB.
Send a continue command to GDB.
Send a finish command to GDB.
Send a next command to GDB.
Send a step command to GDB.
Next: File Dialog Mode, Previous: TGDB Mode, Up: Controlling TGDB [Contents][Index]
When in GDB mode, the user is in command mode or scroll mode. When in command mode, the user is typing in commands to interact with GDB. When in scroll mode, the user can scroll through the GDB output. You can enter scroll mode by typing page up and quit scroll mode by typing q, i or enter.
The commands available in GDB Mode when in command mode are:
Switch back to source window. This is defaulted to the ESC key.
Move up a page and enter scroll mode.
When in command mode, TGDB will pass along any other keys to the readline library. When readline has determined that a command has been received, it alerts TGDB, and a command is then sent to GDB.
The commands available in GDB Mode when in scroll mode are:
Switch back to source window. This is defaulted to the ESC key.
Move up a page.
Move down a page.
Move up 1/2 a page.
Move down 1/2 a page.
Go to the beginning of the GDB buffer.
Go to the end of the GDB buffer.
Move up a line.
Move down a line.
search from current cursor position.
reverse search from current cursor position.
next forward search.
next reverse search.
Jump to the last line.
Exit scroll mode.
Previous: GDB Mode, Up: Controlling TGDB [Contents][Index]
The file dialog is primarily used to allow the user to find and open a source
file that the program they are debugging is made up of. The file dialog will
be full screen, and will list each file that the debugged program is made up
of. A usual instance of the file dialog would be to open it up from the
source window using the o key, and then to search for the file of
interest. If you are looking for foo.c type /foo.c, press enter
once to finish the regular expression and again to select the file.
The commands available in the file dialog are:
Will exit the file dialog, and return to the source window.
Move up a line.
Move down a line.
Move left a line.
Move right a line.
Move up a page.
Move up 1/2 a page.
Move down a page.
Move down 1/2 a page.
Move to the top of the file dialog.
Move to the bottom of the file dialog or to a line number within the file dialog.
search from current cursor position.
reverse search from current cursor position.
next forward search.
next reverse search.
Select the current file.
Next: Highlighting Groups, Previous: Controlling TGDB, Up: Top [Contents][Index]
By default, TGDB stores its user-specific files following the XDG Base Directory Specification. The initialization file is looked for in the following order:
CGDB_DIR environment variable is set (legacy).The XDG directories used by TGDB are:
$XDG_CONFIG_HOME, default ~/.config)Initialization scripts: tgdb/tgdbrc.
$XDG_DATA_HOME, default ~/.local/share)Plugin files, static assets.
$XDG_CACHE_HOME, default ~/.cache)Compiled Python bytecode, temporary logs.
$XDG_STATE_HOME, default ~/.local/state)Command history: tgdb/history.
If the tgdbrc file exists, TGDB executes each one of its lines in order. It is as if the user typed in all the commands into the command-line bar after the TUI was initialized.
The following variables change the behavior of some aspect of TGDB. Many of these commands may be abbreviated in some way, and all boolean commands my be negated by appending ‘no’ to the front. For example: :set ignorecase turns on case-insensitive searching; while :set noignorecase turns on case-sensitive searching.
If this is on, TGDB will automatically reload a source file if it has changed since TGDB has opened it. If it is off, the file will never be reloaded, until you start TGDB again. The default is on. This feature is useful when you are debugging a program, then you modify a source file, recompile, and type r in GDB’s CLI window. The file in this case will be updated to show the new version. Note, TGDB only looks at the timestamp of the source file to determine if it has changed. So if you modify the source file, and didn’t recompile yet, TGDB will still pick up on the changes.
Enable or disable saving command history to disk (default: on). The history is stored in $XDG_STATE_HOME/tgdb/history. See Command History for full details.
Limit the command history to N entries (default: 1024).
Use unlimited to keep all entries.
This option is used to determine what key puts TGDB into TGDB Mode.
By default, the ESC key is used. key can be any normal key
on the keyboard. It can also be any keycode, as long as the keycode notation
is used. This option is especially useful when the user wants to use
readline in vi mode. If the user types set tgdbmodekey=<PageUp>
then the Page Up key will put TGDB into TGDB mode and the ESC
key will flow through to readline.
This option is used to enable or disable color support in TGDB.
The default is on. When enabled, TGDB can display color when appropriate.
This typically occurs when syntax highlighting source files in the source
viewer. When disabled, TGDB will not display colors. It may instead use
other terminal attributes for syntax highlighting, including bold and
reverse attributes. See the highlight commamnd and look for the
‘cterm’ option.
It should be noted that even when color is enabled in TGDB, if ncurses declares that the terminal does not support colors, TGDB will not use colors.
This option controls if the debug window will display colors or not. The default value is on. When enabled, if GDB or the program being debugged output an ANSI escape code representing color, then TGDB will display the corresponding color instead of the escape code. When disabled, TGDB will display the ANSI escape code in the debug window. See https://en.wikipedia.org/wiki/ANSI_escape_code#Colors to learn more about ANSI escape codes.
This option is used to enable or disable showing assembly code in tgdb. The default value is off. When off, TGDB will display the source code to the user. When no source code is available, TGDB will display the assembly code. When this option is enabled, TGDB will display the mixed source and assembly when the source code is enabled and assembly code when the source code is not available. Please note that when assembly mode is displayed, it’s displayed per function instead of per file.
Set the executing line display to style. Possible values for style are ‘shortarrow’, ‘longarrow’, ‘highlight’, and ‘block’. Changes the display that is used to indicate the currently executing line in the source viewer. The default value is ‘longarrow’. The ‘shortarrow’ option draws an arrow next to the source line number. The ‘longarrow’ option also draws an arrow next to the source line number, but extends the arrow until the source code. The ‘highlight’ option draws the entire line in inverse video and the ‘block’ option draws an inverse block (cursor) next to the source code being executed.
Controls how many items are loaded at once when expanding a variable in the locals pane. When set to 0 (the default), all children are fetched in a single request. When set to a positive integer, only N items are fetched initially; a ‘load more items’ sentinel appears at the bottom of the expanded node and can itself be expanded to fetch the next batch.
For variables whose GDB pretty-printer reports
displayhint = "map" (e.g. std::map,
std::unordered_map), each item is a key–value pair.
GDB internally represents each pair as two alternating children (key then
value), so N is multiplied by two when making the GDB request.
This means :set expandchildlimit=5 always shows 5 complete
key–value pairs regardless of the container type.
When enabled, if there is a previous search pattern, highlight all its matches. The default is disabled.
Sets searching case insensitive. The default is off.
Set the size of the scrollback buffer for the gdb window to num lines. The default scrollback is 10000 lines.
Set the selected line display to style. Possible values for style are ‘shortarrow’, ‘longarrow’, ‘highlight’, and ‘block’. Changes the display that is used to indicate the currently selected line in the source viewer. The default value is ‘block’. The ‘shortarrow’ option draws an arrow next to the source line number. The ‘longarrow’ option also draws an arrow next to the source line number, but extends the arrow until the source code. The ‘highlight’ option draws the entire line in inverse video and the ‘block’ option draws an inverse block (cursor) next to the source code being selected.
This option controls if the source window will show marks or not. The default value is on. When enabled, TGDB will show the marks that the user has set in the vertical bar in the source window separating the line number from the source code.
If this is on, TGDB will show all of the commands that it sends to GDB. If it is off, TGDB will not show the commands that it gives to GDB. The default is off.
Sets the current highlighting mode of the current file to have the syntax style. Possible values for syntax are ‘c’, ‘asm’, ‘d’, ‘go’, ‘ada’, ‘rust’, ‘off’, ‘no’, ‘on’ or ‘yes’. Normally, the user will never have to do this, since TGDB automatically detects what syntax a file should be based on its file extension. However, this feature can currently be useful for debugging purposes. ‘on’ and ‘yes’ enable syntax highlighting based on the source files extension. ‘off’ and ‘no’ disable syntax highlighting. The remaining values set the specific language highlighters independent of the source files extension.
This option is used along with the ttimeout option to determine the behavior TGDB should have when it receives part of a mapped key sequence or a keyboard code sequence. If this option is on, TGDB will time out on both user defined mappings and on key codes from the keyboard. If this option is off, user defined mappings will not be timed out on. In this case, TGDB will determine if it should time out on key codes from the keyboard by examining the ttimeout option. To determine how TGDB will time out on mappings and key codes, and what time out lengths TGDB will use, please refer to the chart in Key User Interface. The default value for this option is on.
This option is used along with the ttimeoutlen option. It represents the number of milliseconds that TGDB should wait for a key code from the keyboard or for a mapped key sequence to complete. If delay is 0, TGDB immediately accepts each character it receives. This will prevent any mappings or key codes to complete. delay may be any value between 0 and 10000, inclusive. The default setting for the delay variable is 1000 (one second).
This option is used along with the timeout option to determine the behavior TGDB should have when it receives part of keyboard code sequence. If this option is on, TGDB will time out on key codes from the keyboard. If this option is off, TGDB will determine if it should time out on key codes from the keyboard by examining the timeout option. To determine how TGDB will time out on key codes, what what time length it will use, please refer to the chart in Key User Interface. The default value for this option is on.
This option is used along with the ttimeoutlen option. It represents the number of milliseconds that TGDB should wait for a key code from the keyboard. If delay is 0, TGDB immediately accepts each character it receives. This will prevent any key codes to complete. delay may be any value between 0 and 10000, inclusive. The default setting for the delay variable is 100 (one tenth of a second).
Sets the number of spaces that should be rendered on the screen for TAB characters. The default value for number is 8.
The minimal height of a window. Windows will never become smaller than this value. The default value for number is 0. This is useful when winsplitorientation is set to ‘horizontal’.
The minimal width of a window. Windows will never become smaller than this value. The default value for number is 0. This is useful when winsplitorientation is set to ‘vertical’.
Set the split point between source and GDB window. This is especially useful as an init setting in your tgdbrc file. See Configuring TGDB. The possible values for style are ‘src_full’, ‘src_big’, ‘even’, ‘gdb_big’, and ‘gdb_full’.
Sets the window split orientation to either ‘horizontal’ (which places the source window above and the GDB window below), or ‘vertical’ ( hich places the source window on the left and the GDB window on the right). See Configuring TGDB.
Searches wrap around the end of file. The default is on.
Configures the clipboard tool used for right-click copy/paste in the GDB window. Setting this option does two things immediately:
$PATH (if not
already present), so the tool can be found by the clipboard library.pyperclip.set_clipboard(toolname) is called to
select the backend explicitly, bypassing auto-detection.This is useful when xclip is installed in a non-standard location
or when pyperclip’s auto-detection picks the wrong tool. Example:
:set clipboardpath=/usr/local/bin/xclip
Setting an empty value is a no-op. xsel typically works without
this option; xclip often requires it.
Selects the formatter that every Memory pane uses to render its
bytes. expression is a Python constructor call evaluated in the
same namespace used by :python blocks, so user-defined classes
loaded via :python are visible here. Setting an empty value
restores the built-in default MemoryFormatter(). Examples:
:set memoryformatter=MemoryFormatter(group_bytes=4, row_groups=4) :set memoryformatter='MemoryFormatter(byte_format="bin", group_bytes=2, row_groups=2)' :set memoryformatter='MyFormatter(arg1=10, arg2="hello")'
A formatter is any object exposing a callable
format(width, height, blocks, hl) that returns a
rich.text.Text (or None to render nothing) plus
an optional header(width, height, hl) with the same return
type. blocks is the raw list-of-dicts payload from GDB’s
-data-read-memory-bytes MI command. When the expression
fails to evaluate or the resulting object does not satisfy the contract
TGDB falls back to the default formatter and reports the error.
The built-in MemoryFormatter accepts these keyword
arguments (all optional):
show_header=TrueRender a column legend (+0 +1 ... +F) above the dump.
Labels are right-aligned within their byte slot and the cadence is
widened automatically (stride 2, 4, …) when offsets would
otherwise overrun their column.
show_address=TruePrefix each row with its hex address.
show_ascii=TrueAppend an ASCII column. ASCII is always rendered in the original
byte order, regardless of any reverse_* flag.
group_bytes=4Bytes per visual group (separated by a single space).
row_groups=4Groups per row. Total bytes per row is
group_bytes * row_groups.
reverse_groups=FalseMirror group order so the right-most group holds the lowest-offset bytes; the header legend follows the same ordering.
reverse_bytes=FalseMirror byte order inside each group.
reverse_bits=FalseBit-reverse every byte (0x88 → 0x11) in the
numeric column. ASCII is unaffected.
byte_format='hex'One of 'hex', 'bin', 'oct',
'dec'. All bytes use the format’s fixed cell width
(2 / 8 / 3 / 3). Decimal uses space padding (so 1 renders
as 1); the bit/octal formats use zero padding.
Send a continue command to GDB.
Send a down command to GDB.
reloads the file in the source window. this can be useful if the file has changed since it was opened by tgdb.
Send a finish command to GDB.
This will display the current manual in text format, in the source window.
This will display one of TGDB’s logos in the source window.
Set the color and attributes for a highlighting group. The syntax mimics vim’s “highlight” command. Possible values for group, attributes and color are available in Highlighting Groups.
You can give as many or as few of the name=value pairs as you wish, in any order. ‘ctermfg’ and ‘ctermbg’ set the foreground and background colors. These can be specified by color number or by using the same color names that vim uses. When TGDB is linked with ncurses, the number you use to represent the color can be between -1 and COLORS. When TGDB is linked against curses, it must be between 0 and COLORS.
‘cterm’ sets the video attributes for color terminals. ‘term’ sets the video attributes for monochrome terminals. Some examples are,
:highlight Logo cterm=bold,underline ctermfg=Red ctermbg=Black :highlight Normal cterm=reverse ctermfg=White ctermbg=Black :hi Normal term=bold
Move focus to the GDB window.
Send a next command to GDB.
Send a nexti command to GDB.
Quit TGDB.
Send a run command to GDB.
Send a start command to GDB.
Send a kill command to GDB.
Send a step command to GDB.
Send a stepi command to GDB.
Turn the syntax on or off.
Send an until command to GDB.
Send an up command to GDB.
Create a new mapping or overwrite an existing mapping in TGDB mode. After the command is run, if lhs is typed, TGDB will get rhs instead. For more details on how to use the map command look in Using Maps.
Delete an existing mapping from TGDB mode. lhs is what was typed
in the left hand side when the user created the mapping. For example, if
the user typed :map a<Space>b foo then the user could delete the
existing mapping with :unmap a<Space>b.
Create a new mapping or overwrite an existing mapping in GDB mode. After the command is run, if lhs is typed, TGDB will get rhs instead. For more details on how to use the map command look in Using Maps.
Delete an existing mapping from GDB mode. lhs is what was typed
in the left hand side when the user created the mapping. For example, if
the user typed :imap a<Space>b foo then the user could delete the
existing mapping with :iunmap a<Space>b.
Add expression to the Evaluations pane. The pane must already be open (use the workspace context menu → Add → Evaluations). Each entry is re-evaluated automatically on every GDB stop.
Remove the N-th entry from the Evaluations pane (1-based index).
Show the bytes at address (a hex literal, decimal, or any GDB expression) in a Memory pane. When size is omitted the dump is sized to fit the visible pane and grows on resize.
Memory panes are multi-instance. The command first reuses any already-mounted Memory pane that has no content yet; otherwise it spawns a fresh Memory pane directly below the most recently opened one. At least one Memory pane must already be present in the workspace (add it from the context menu) so that TGDB knows where to anchor the new split.
Toggle inline disassembly in the source pane. With no argument the current state is flipped. Independent of the dedicated Disasm pane (which can be opened from the workspace context menu).
Next: Highlighting Groups, Previous: Configuring TGDB, Up: Top [Contents][Index]
TGDB keeps track of every command you type into the command-line bar during your debugging session so that you can recall or replay them later. History is saved to and loaded from $XDG_STATE_HOME/tgdb/history (default: ~/.local/state/tgdb/history).
While the command-line bar is open (after pressing :), use:
Go to the previous command in the history list. If you have already typed some text before pressing Up, only commands whose text starts with that prefix are shown (prefix-search mode).
Go to the next command in the history list (matching the same prefix). Pressing Down past the last matching entry restores the original input.
Enable or disable command history saving. When enabled (the default), each command you type is appended to the history file automatically. When disabled, commands are still available for in-session recall with Up/Down, but nothing is saved to disk.
Set the maximum number of entries kept in the history list. The default
is 1024. Use unlimited (or any negative number) to keep
all entries. A value of 0 disables history storage entirely.
Negative values are rejected with an error.
Save the commands recorded in the current session to the history file
(or to filename if given). Note that the save history
command itself appears at the end of the saved file; you may want to
edit the file before using :source to replay it.
TGDB lets you define your own commands that work just like built-in ones. A user-defined command is a name with optional attributes and a replacement template: when the command is invoked the template is expanded and the resulting string is executed as a normal TGDB command.
All user-defined command names must begin with an uppercase letter.
The remaining characters may be uppercase letters, lowercase letters, or
digits (e.g. Rename, Setcmd, PyLog2).
Built-in commands are all lowercase so there is never a collision.
When invoking a user-defined command you may abbreviate it as long as the abbreviation is unambiguous. If two user commands share a common prefix, typing that prefix results in an “Ambiguous command” error.
:command Rename ... :command Renumber ... :Rena Means “Rename” :Renu Means “Renumber” :Ren Error — ambiguous
List all user-defined commands in a table showing name, -nargs,
completion function, and replacement template.
List user-defined commands whose name begins with prefix.
Define a new user command. Name must start with an uppercase letter. repl is the replacement template (see Replacement Text). If a command with the same name already exists an error is reported.
-nargs)By default a user command takes no arguments. Use -nargs to change
this:
-nargs=0No arguments are allowed (the default).
-nargs=1Exactly one argument is required. The entire text after the command name (including spaces) is treated as the single argument.
-nargs=*Any number of arguments are allowed (0, 1, or many), separated by whitespace.
-nargs=?Zero or one argument.
-nargs=+One or more arguments (at least one is required).
-complete)Argument completion can be enabled for a user command:
-complete=FuncName
FuncName must be the name of a Python function that has been defined
in TGDB’s Python namespace (via :python or :pyfile) with the
following signature:
def FuncName(ArgLead: str, CmdLine: str, CursorPos: int) -> list[str]:
...
ArgLead is the leading portion of the argument currently being
completed. CmdLine is the full command-line string.
CursorPos is the cursor position (character index).
The function should return a list of candidate strings.
Pressing Tab in the status bar while typing a user command invokes the completion function. Subsequent Tab presses cycle through the candidates; any other key accepts the current candidate and clears the cycle.
Specifying -complete when -nargs=0 is an error.
Complete user names for a Finger command: :command -nargs=1 -complete=ListUsers Finger python print(args) def ListUsers(A, L, P): import subprocess return subprocess.check_output(["cut","-d:","f1","/etc/passwd"]).decode().splitlines() Complete Python source files: :command -nargs=1 -complete=PyFiles EditPy python print(args) def PyFiles(A, L, P): import glob return glob.glob(f"{A}*.py")
The replacement template repl is scanned for <…> escape
sequences. All other text is copied unchanged. The expanded string is
then executed as a TGDB command. To include a literal < use
<lt>.
<args>The command arguments exactly as supplied (raw text, spaces preserved).
<q-args>All arguments joined as a single JSON-quoted Python string. Suitable
for passing to a Python function or for string concatenation.
When there are no arguments this expands to "".
<f-args>Arguments split on whitespace, each individually JSON-quoted and
joined with commas, suitable for use as a Python function argument list.
A backslash before a space prevents splitting at that space.
A double backslash \\ produces a single backslash.
A backslash before any other character is left unchanged.
When there are no arguments this expands to nothing (empty string).
<lt>A literal < character. Use this to include a literal escape
sequence in the output, e.g. write <lt>args> to get the text
<args> rather than the argument expansion.
Summary table (command :MyCmd one two):
| Escape | Expands to | Typical use |
|---|---|---|
<args> | one two | Pass raw text to a built-in command |
<q-args> | "one two" | Pass as a single Python string argument |
<f-args> | "one","two" | Pass as separate Python function arguments |
<lt> | < | Literal < |
Alias :Setcmd to :set :command -nargs=1 Setcmd set <args> :Setcmd tabstop=4 executes: set tabstop=4 Call a Python function with multiple separate arguments (<f-args>): :command -nargs=* Mycmd python Myfunc(<f-args>) :Mycmd arg1 arg2 executes: python Myfunc("arg1","arg2") Pass all arguments as a single quoted string (<q-args>): :command -nargs=* PyLog python print("tgdb sent: " + <q-args>) :PyLog one two executes: python print("tgdb sent: " + "one two") Use<lt>to include a literal escape in the output: :command -nargs=1 ShowTag python print("<lt>args>") :ShowTag foo executes: python print("<args>")
Next: Key User Interface, Previous: Configuring TGDB, Up: Top [Contents][Index]
TGDB is capable of using colors if the terminal it is run in supports them. Until version 0.6.1, TGDB did not allow the user to configure these colors in any way. TGDB color use is now fully configurable.
TGDB’s modeled its use of color highlighting after vim. Any data that will be colored in the terminal is represented by a highlighting group. A highlighting group represents data that should be formatted using foreground colors, background colors and attributes. There are currently several types of highlighting groups in TGDB. There are syntax highlighting groups, which represent syntax highlighting of sources files. There are also User Interface groups, which represent things like TGDB’s logo, or the status bar.
Each highlighting group has a default set of attributes and colors associated with it. You can modify a highlighting groups properties by using the highlight command. See Configuring TGDB.
Note that TGDB currently supports using the same background color the terminal was using before TGDB was started. However, this only works when TGDB was linked with ncurses. If you link TGDB with curses, then TGDB will force the background to Black.
| • Available Highlighting Groups: | The different highlighting groups. | |
| • Available Attributes: | The different attributes. | |
| • Available Colors: | The different colors. |
Next: Available Attributes, Up: Highlighting Groups [Contents][Index]
Below is a list of all the highlighting groups that CDGB will use when syntax highlighting source files.
StatementThis represents the keywords a language defines.
TypeThis represents the types a language defines.
ConstantThis represents either a string or numeric value.
CommentThis represents the comments in a source file.
PreProcThis represents the C/C++ preprocessor commands.
NormalThis represents all normal text.
Below is a list of all the highlighting groups that TGDB will use when it is displaying it’s User Interface.
CommandLineThis represents the command-line bar at the bottom of TGDB. The file
dialog’s prompt bar also uses this group. The legacy name
StatusLine is accepted as an alias for backward compatibility with
cgdbrc files.
SearchThis represents the group used when displaying the previous search in either the source window, the GDB window in scroll mode, or the file dialog window. This is only used when the hlsearch option is enabled.
IncSearchThis represents the group used when the user is searching in either the source window, the GDB window in scroll mode, or the file dialog window.
SelectedLineArrowThis represents the group used when the user has the
selectedlinedisplay set to shortarrow or longarrow.
ExecutingLineArrowThis represents the group used when the user has the
executinglinedisplay set to shortarrow or longarrow.
SelectedLineHighlightThis represents the group used when the user has the
selectedlinedisplay option set to highlight.
ExecutingLineHighlightThis represents the group used when the user has the
executinglinedisplay option set to highlight.
SelectedLineBlockThis represents the group used when the user has the
selectedlinedisplay option set to block.
ExecutingLineBlockThis represents the group used when the user has the
executinglinedisplay option set to block.
BreakpointThis represents the group that is used when TGDB displays a line that has a breakpoint set.
DisabledBreakpointThis represents the group that is used when TGDB displays a line that has a disabled breakpoint set.
SelectedLineNrThis represents the group that is used when TGDB is displaying the currently selected line. This is the line that the cursor is on.
ExecutingLineNrThis represents the group that is used when TGDB is displaying the currently executing line.
ScrollModeStatusThis represents the group that is used when TGDB is displaying the currently selected line number when in GDB Mode and the user is scrolling through the GDB buffer.
LogoThis is the group TGDB uses to display its logo on startup when no source file can be auto detected.
MarkThis is the group TGDB uses to display a mark in the source window.
Marks are displayed when the showmarks option is enabled.
See the showmarks option for more detail.
MemoryGroupBackground tint applied to every byte-group cell rendered by the
default MemoryFormatter in the Memory pane, so that
adjacent groups are visually distinguishable without harsh contrast.
The header row is intentionally not tinted. Override with
:highlight MemoryGroup ctermbg=... (use
ctermbg=none to disable the tint entirely).
Next: Available Colors, Previous: Available Highlighting Groups, Up: Highlighting Groups [Contents][Index]
TGDB supports many of the attributes that curses provides. It will apply the attributes to the output window, but it is up to the terminal you are using to support such features.
The list of attributes that TGDB currently supports is below.
normalNONEThis will leave the text normal. Uses A_NORMAL curses attribute.
boldThis will make the text appear bold. Uses A_BOLD curses attribute.
underlineThis will underline the text. Uses A_UNDERLINE curses attribute.
reverseinverseThis will reverse the foreground and background colors. Uses A_REVERSE curses attribute.
standoutThis is the best highlighting mode of the terminal. Uses A_STANDOUT curses attribute.
blinkThis will cause the text to blink. Uses A_BLINK curses attribute.
dimThis will cause the text to be 1/2 bright. Uses A_DIM curses attribute.
Previous: Available Attributes, Up: Highlighting Groups [Contents][Index]
TGDB supports several colors, depending on how many colors your terminal supports. Below is a chart of the colors that TGDB provides. The values for each color represent the defines from the curses header file passed to init_pair() to ask curses to create a new color.
COLOR NAME | Color | Bold attribute |
| Black | COLOR_BLACK | No |
| DarkBlue | COLOR_BLUE | No |
| DarkGreen | COLOR_GREEN | No |
| DarkCyan | COLOR_CYAN | No |
| DarkRed | COLOR_RED | No |
| DarkMagenta | COLOR_MAGENTA | No |
| Brown, DarkYellow | COLOR_YELLOW | No |
| LightGray, LightGrey, Gray, Grey | COLOR_WHITE | No |
| DarkGray, DarkGrey | COLOR_BLACK | Yes |
| Blue, LightBlue | COLOR_BLUE | Yes |
| Green, LightGreen | COLOR_GREEN | Yes |
| Cyan, LightCyan | COLOR_CYAN | Yes |
| Red, LightRed | COLOR_RED | Yes |
| Magenta, LightMagenta | COLOR_MAGENTA | Yes |
| Yellow, LightYellow | COLOR_YELLOW | Yes |
| White | COLOR_WHITE | Yes |
Next: Terminal Control Flow, Previous: Highlighting Groups, Up: Top [Contents][Index]
The Key User Interface is how TGDB receives input from the user. It is usually referred to as the KUI. TGDB simply asks the KUI for the next key the user typed and the KUI will provide it.
The KUI has 2 major responsibilities besides reading normal user input and providing it to TGDB. It needs to detect when the user has typed a user defined map or when the user has hit a special key on the keyboard.
A user defined map, or simply map, is used to change the meaning
of typed keys. Some users may refer to this type of functionality as a
macro. An example would be map a b. If the user then typed
the a character, the KUI would detect that it was mapped to b
and return b to TGDB.
When the user types a special key on the keyboard, a key code is sent to TGDB. Typically, keys like HOME, DEL, F1, etc, when pressed will send several characters to the application instead of just one character like a normal key does. These characters combined are called a key sequence. The KUI is responsible for assembling the key sequences back together and reporting to TGDB that a particular key was typed by the user. The ESC key is special because typically most key codes start with that key. This usually gives all key codes a common first key in its key sequence. The KUI uses the terminfo database to determine what key sequences are sent by which keycodes. There are a few commonly used key sequences that are hard coded into TGDB.
A major challenge the KUI has to overcome is determining when a map or a
key sequence is received. The KUI sometimes will need to read more than
one character to determine this. For example, if the user has 2 maps,
map abc def and map abd def, the KUI would have to buffer at
least the characters a and b before it could determine if the
user was going to type a map. After the next key press, if the user types
c or d then a map was received and the KUI will return
d e f to TGDB. Otherwise, no map was received and the KUI must return
a b to TGDB.
The options timeout, ttimeout, timeoutlen and ttimeoutlen can be used to tell the KUI if it should timeout on partial mappings or key sequences, and if so, how long it should wait before timing out.
| • Configuring the KUI Time Out Options: | The KUI’s time out options | |
| • Using Maps: | Using maps | |
| • Understanding Keycodes: | Understanding keycodes |
Next: Using Maps, Up: Key User Interface [Contents][Index]
The KUI may be configured to time out on either maps or key sequences.
When the KUI is matching a partial map or key sequence it is capable of timing out. This means it will simply accepts the keys it has received so far if a certain amount of time elapses between key presses. This is obvious when the user is typing a map because the user must press each key individually. For partial key sequences, this is less obvious. That is because the user only presses a single key, but multiple characters are sent to TGDB. The table below describes how the user can configure the KUI to time out on key codes or maps. The timeout and ttimeout options control this functionality.
| timeout | ttimeout | action |
|---|---|---|
| off | off | do not time out |
| on | on or off | time out on maps and key codes |
| off | on | time out on key codes |
It is also possible to tell the KUI how long to wait before timing out on a partial match. If timeout is on, then the KUI will wait a certain amount of time for the next character, when matching a map, before it decides a match is no longer possible. If timeout or ttimeout is on, then the KUI will wait a certain amount of time for the next character, when matching a key sequence, before it decides a match is no longer possible. The timeoutlen and ttimeoutlen options can be configured by the user to tell the KUI how long to wait before timing out. The table below describes when the KUI uses which option.
| timeoutlen | mapping delay | key code delay |
|---|---|---|
| < 0 | timeoutlen | timeoutlen |
| >= 0 | timeoutlen | ttimeoutlen |
A value of 0 means that the KUI will time out right away. It will not be possible to match a map or key code in this circumstance.
A common problem could be that when the user types a special key like
the left or right arrows, TGDB will go into the source mode and not
perform the action requested by the user. This typically means that the
key code delay is to small. If you try setting the option
set ttimeoutlen=1000 TGDB should start acting like the user expects.
If not, please report this to the TGDB mailing list.
Next: Understanding Keycodes, Previous: Configuring the KUI Time Out Options, Up: Key User Interface [Contents][Index]
TGDB fully supports the use of maps. It allows the user to change the
meaning of typed keys. For example, you could have the following map
:map <F2> ip<Space>argc<CR>.
When the user is in TGDB mode and they hit F2, the value of the map will be used instead. The i key will first be received by TGDB, and it will put the user into insert mode. Next, TGDB will get p argc followed by the Enter key.
TGDB currently supports two mapping lists. Any mapping that was added with the map command will be used by TGDB when it is in TGDB mode. You can delete a mapping that you have created with the map command with the unmap command. If you want to have mappings in GDB mode, you can use the imap command. Similarly, iunmap will delete a mapping in the imap set. Some examples of this would be
map a<Space>b foo unmap a<Space>b imap a<CR>b foo iunmap a<CR>b
Previous: Using Maps, Up: Key User Interface [Contents][Index]
The above example could use a little more explaining for people unfamiliar with vim maps. The map takes a key and a value. They are separated by a space. Neither the key or value can have a space in them, or it is considered to be the separator between the key and value. If the user desires to have a space in either the key or value part of a map, they can use the keycode notation <Space>. Below is a table of the keycodes in keycode notation form. The keycode notation can be used in any mapping command.
| notation | meaning |
|---|---|
| <Esc> | escape key |
| <Up> | cursor up key |
| <Down> | cursor down key |
| <Left> | cursor left key |
| <Right> | cursor right key |
| <Home> | home key |
| <End> | end key |
| <PageUp> | page up key |
| <PageDown> | page down key |
| <Del> | delete key |
| <Insert> | insert key |
| <Nul> | zero |
| <Bs> | backspace key |
| <Tab> | tab key |
| <NL> | linefeed |
| <FF> | formfeed |
| <CR> | carriage return |
| <Space> | space |
| <Lt> | less-than |
| <Bslash> | backslash |
| <Bar> | vertical bar |
| <F1> - <F12> | function keys 1 to 12 |
| <C-...> | control keys |
| <S-...> | shift keys |
Next: Building TGDB, Previous: Key User Interface, Up: Top [Contents][Index]
A user can typically set there control flow behavior by using the stty
command like so stty -ixon -ixoff. This will disable control flow on
the terminal where TGDB is started. If you want to turn control flow back
on you can type stty ixon ixoff. If flow control is on, when the user
types Ctrl-s, the terminal stops. When the user types Ctrl-q, the
terminal restarts. When using readline, the Ctrl-s character usually does
a forward search. So, if you want to get this, or other functionality out of
readline, simply turn off control flow and start TGDB.
Next: Copying This Manual, Previous: Terminal Control Flow, Up: Top [Contents][Index]
Building TGDB from source requires several packages. First, TGDB is hosted at GitHub. You can determine how to get TGDB from source by looking here: https://tgdb.github.io/
Once you have the source to TGDB, now you can begin to build it. You will of course need many packages to build TGDB. Below is a list of all of them that are required to build TGDB.
GNU MakeI have successfully used version 3.79.1, however, older versions probably will work.
GNU GCCThe GNU C compiler. I’ve compiled TGDB with versions as old as 2.9.5, and as new as 4.0.2.
GNU ReadlineThe GNU readline library version 5.1. TGDB will not work with versions before 5.1. Readline was modified specifically to work with TGDB.
GNU NcursesI have successfully used libncurses.so.5 successfully. However, older versions probably will work.
Below is a list of optional packages you will need, if modifying certain files in TGDB.
GNU FlexIf you modify any files with an extension of .l, you will have to have
flex installed. I have used flex 2.5.4 to build TGDB.
GNU TexinfoIf you modify doc/tgdb.texinfo, then you will be required to have this package installed. I have used version 4.7 to build the documentation for TGDB.
TGDB uses autoconf/automake to build its configure scripts and makefiles. So, if you change any of the autoconf/automake files, you will need this software installed.
GNU AutomakeThis has the program aclocal, and must be version Version 1.9.5.
GNU AutoconfThis has the program autoconf, and must be version 2.59.
GNU m4This has the program m4, and must be version 1.4.3.
Next: Index, Previous: Building TGDB, Up: Top [Contents][Index]
Copyright © 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software—to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation’s software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author’s protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors’ reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone’s free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and “any later version”, you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
one line to give the program's name and a brief idea of what it does. Copyright (C) yyyy name of author This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands ‘show w’ and ‘show c’ should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than ‘show w’ and ‘show c’; they could even be mouse-clicks or menu items—whatever suits your program.
You should also get your employer (if you work as a programmer) or your school, if any, to sign a “copyright disclaimer” for the program, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice
This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License.
Previous: Copying This Manual, Up: Top [Contents][Index]
| Jump to: | A B C F G H I R S T U |
|---|
| Jump to: | A B C F G H I R S T U |
|---|