export HELIX_LIBS=/usr/local/RealPlayer
/usr/local/RealPlayer/realplay.bin &
[1] 4175
the number 4175 will be the process id which will be used by gdb.
Then start gdb in emacs, "ESC-x gdb":
attach 4175
will attach the running process with gdb, then, I can set break points for my plugins.
When debugging, the main problem here is, the helix code is not available since I directly pull the builtin files from www.real.com, so the `next' command will complain when there's not valid code to debug. Here is a reference from RMS gdb manual:
The next command will exit any functions we can't debug (like C library functions).
Since `next' will not work if the plugs calls a function from helix, but the other command `until' still works, the only thing is, I may not like to use this command.