I just checked in minimal support for a Flash movie debugger into Gnash. To activate this, start gnash with "-g". This drops you into a console when Gnash first starts so you can set watchpoints. Then type "c" to continue, and when it stops at a watch point, you can use various commands to dump the registers, the stack, etc... Type "?" at any time for simple list of commands. There is also now a dynamic disassembler. Type "t", to toggle tracing on and off. When Tracing is enabled, the current opcode is disassembled and printed. This is roughly equivalent to "-va", but is controlled from within the debugger, and has more verbose output than using -va.
As Flash has no line numbers more symbol table, currently there isn't breakpoint support quite yet. For that I plan to allow one to say "b foobar" and then when the "foobar" Flash functions is called, it'll break. In this version only variable watchpoints work. When setting a watchpoint, you can specify a "r" to break on reads of the variable, or a "w" to break on a write to the variable. "i w" dumps the currently set of watchpoints. So "w foobar r" breaks when the movie reads the foobar variable, and "w foobar d" removes the watchpoint. Future enhancements will allow expanding the as_values on the stack to get to the internal data, and adding a call stack. This should not only help us debug Gnash itself, but should be useful to Flash developers. One of these days I plan to add remote debugger support, but for now I pan to focus on making this more functional. I'll be adding to this over the next few days, but anyone else that has an idea for a debugger feature should feel free to add it. Basically the guts of any new feature go in the Debugger class, with a command hook in Debugger::usage() and Debugger::console(). If you don't want debugger support, configure with --disable-debugger. Ann, can you add all this to the manual ? - rob - _______________________________________________ Gnash-dev mailing list Gnash-dev@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-dev