Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

An Example .gdbinit File

Below is an example .gdbinit file used with the simple example STK patch (the ``acoustic echo simulator'') described above:

echo    set args 2 \n
        set args 2

echo    dir ../../src \n
        dir ../../src

echo    b FileWvIn::tick(void) \n
        b FileWvIn::tick(void)

The .gdbinit file goes in the same directory as the main program where gdb is started. It assumes that the library of standard stklib modules is located in ../../src/ (which works if your main directory is located in or parallel to subdirectories of the STK projects folder). A correct pointer to the STK source directory is necessary for viewing source code while single-stepping standard STK modules.

Note that a breakpoint is always set at the tick function of the FileWvIn object. When the program is run, it will halt just before sound reading begins, after preliminary set-up is finished. You can also set the breakpoint at main in order to see absolutely everything that happens.

The ``echo'' commands are not required, but they remind the user that the .gdbinit file is being executed every time gdb is started in this directory.


Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Download stkintro.pdf
[Comment on this page via email]

``Getting Started with the Synthesis Tool Kit (STK)'', by Julius O. Smith III, Music 420 Reader supplementing the text).
Copyright © 2013-01-13 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA