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?

  

Miscellaneous tricks in gdb under Emacs

  • To get back to debugging after a spate of editing, go to the gdb buffer (the one named *gud-<program name>*) and type up followed by down. This restores the source pointer in the other window.

  • Reissuing the M-x gdb command to emacs will go to the pre-existing debugging session, if any. Therefore, after the program is recompiled, emacs's gdb buffer must be explicitly killed.

  • To break when an input signal file is nonzero after a long string of zeros, use a conditional breakpoint. E.g.,
    cond 2 insamp != 0
    cont
    

  • When single-stepping, everything on one line is executed by the next command. Thus, for example, typing n at the line
    for ( i=0; i<6; i++ ) { string[i] = 0 };
    
    will execute the entire loop, while
    for ( i=0; i<6; i++ ) { 
            string[i] = 0 
    };
    
    must be traversed all six iterations. (Of course, you can also set a breakpoint after the loop and then continue to it.)


Order a Hardcopy of Physical Audio Signal Processing

Previous: Dealing with C++ in gdb
Next: STK Programming Examples

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? )