Quicktime and GDB
Jump to navigation
Jump to search
Debugging Components Using Quicktime Player and GDB
To get a debugger attached and put breakpoints into functions in your component files:
- launch qt player
- find its pid using ps
- launch gdb
- attach to the pid (attach pid). This will cause qt player to freeze
- use future-break to set breakpoints (or source them from a file)
- type "continue" (or just "c") to resume qt player
- load an ogg vorbis file in qt player
- press play
- work in gdb as your breakpoints are hit.
On other way, if you work with XCode:
- Select create New Custom Executable
- Choose an application that use component (QuickTime, iTunes, AudioUnit Lab...)
- Set break points in your projects.
- Use the Debug command to launch the application, and GDB will break normally.
A few useful gdb commands
- future-break
- sets a breakpoint at a function from a dynamic library that hasn't been loaded yet
- rbreak regexp
- break in any function matching regexp
- source fname
- execute gdb commands found in fname
Also, stdout from any printf's ends up in console.log, which can be viewed in Console.app