[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] Flash debugger support

From: Rob Savoye
Subject: [Gnash-dev] Flash debugger support
Date: Tue, 06 Feb 2007 10:46:54 -0700
User-agent: Thunderbird (X11/20070102)

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 -

reply via email to

[Prev in Thread] Current Thread [Next in Thread]