gldb — console-based OpenGL debugger
gldb
your-program
[argument
...]
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.
name
Specifies the name of the filter-set chain to use from
the configuration file
~/.bugle/filters
. If
name
is
none
then the default (no filters)
is used.
Shows the list of commands, with brief descriptions.
Starts the program.
Continues running the program.
Runs the program until the next OpenGL call.
Kills the running program.
function
Sets a breakpoint on the OpenGL function
function
.
Breaks on OpenGL errors. This is the default behaviour.
function
Clears a breakpoint on
function
.
Prevents breaking on OpenGL errors.
Exits gldb.
Prints a stack trace using gdb(1)
Starts gdb(1) and attaches it to the program.
The program will be waiting for commands from gldb, so continuing the program will have no effect.
state
Queries the OpenGL state
state
.
If state
is 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.
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 on
filename
.ppmglXSwapBuffers
and call this command from there.
filter-set
, disable filter-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.
BUGLE_CHAIN
, BUGLE_DEBUGGER
, BUGLE_DEBUGGER_FD_IN
, BUGLE_DEBUGGER_FD_OUT
Internal environment variables used to communicate between the debugger and the library.
LD_PRELOAD
Used internally to force loading of the library.