Quicktime and GDB

From XiphWiki
Revision as of 01:38, 15 September 2005 by N8gray (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, 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.

A few useful gdb commands

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