Sign in

username:

password:



Not a member?

Search Online Books



Search tips

Free Online Books

Ads

Chapters

Chapter Contents:

Search Physical Audio Signal Processing

  

Book Index | Global Index


Would you like to be notified by email when Julius Orion Smith III publishes a new entry into his blog?

  

An example .gdbinit file.

Below is an example .gdbinit file used with the simple example STK patch (the ``acoustic echo simulator'') described in §A.4 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.


Order a Hardcopy of Physical Audio Signal Processing

Previous: Debugging STK Programs in gdb
Next: Preparing your Program for Debugging

written by Julius Orion Smith III
Julius Smith's background is in electrical engineering (BS Rice 1975, PhD Stanford 1983). He is presently Professor of Music and Associate Professor (by courtesy) of Electrical Engineering at Stanford's Center for Computer Research in Music and Acoustics (CCRMA), teaching courses and pursuing research related to signal processing applied to music and audio systems. See http://ccrma.stanford.edu/~jos/ for details.


Comments


No comments yet for this page


Add a Comment
You need to login before you can post a comment (best way to prevent spam). ( Not a member? )