[About] [News] [Documentation] [Screenshots]
Name
gldb — console-based OpenGL debugger
Synopsis
gldb your-program [argument...]
Description
Note
gldb(1) has been almost entirely superseded by gldb-gui(1), and is not actively maintained. You should try gldb-gui(1) first and only use gldb(1) if gldb-gui(1) does not work.
gldb is a front-end debugger to bugle(3), modelled on gdb(1). It can set breakpoints on OpenGL functions, and by default will stop whenever the program causes a GL error. Pressing Ctrl+C will also cause the running program to stop.
Commands
- chain
name Specifies the name of the filter-set chain to use from the configuration file
~/.bugle/filters. Ifnameisnonethen the default (no filters) is used.- help
Shows the list of commands, with brief descriptions.
- run
Starts the program.
- continue
Continues running the program.
- step
Runs the program until the next OpenGL call.
- kill
Kills the running program.
- break
function Sets a breakpoint on the OpenGL function
function.- break error
Breaks on OpenGL errors. This is the default behaviour.
- unbreak
function Clears a breakpoint on
function.- unbreak error
Prevents breaking on OpenGL errors.
- quit
Exits gldb.
- backtrace
Prints a stack trace using gdb(1)
- gdb
Starts gdb(1) and attaches it to the program.
Note
The program will be waiting for commands from gldb, so continuing the program will have no effect.
- state
state Queries the OpenGL state
state. Ifstateis omitted, all state for the current context is shown. Try first running the command without argument to see how the states are arranged, as some state is nested. For example, the width of the default 2D texture is referenced as GL_TEXTURE_2D.0.0.GL_TEXTURE_WIDTH. Tab completion is also supported.- screenshot
filename.ppm Captures a screenshot from the back buffer, and saves it to
in ppm(5) format. Since the back buffer is used, you are not guaranteed a complete picture. For a complete picture, put a breakpoint onfilename.ppmglXSwapBuffersand call this command from there.- enable
filter-set, disablefilter-set Enables or disables a filter-set on the fly. This is still experimental, and won't work for most filter-sets (because they expect to perform initialisation when the context is created). Dependent filter-sets will automatically be enabled, but will not be automatically disabled.
Environment
BUGLE_CHAIN,BUGLE_DEBUGGER,BUGLE_DEBUGGER_FD_IN,BUGLE_DEBUGGER_FD_OUTInternal environment variables used to communicate between the debugger and the library.
LD_PRELOADUsed internally to force loading of the library.

