search for: swfdecdebuggercommand

Displaying 5 results from an estimated 5 matches for "swfdecdebuggercommand".

2007 Mar 13
0
2 commits - libswfdec/swfdec_debugger.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h
...r.c b/libswfdec/swfdec_debugger.c index 7f3546d..c17c315 100644 --- a/libswfdec/swfdec_debugger.c +++ b/libswfdec/swfdec_debugger.c @@ -32,32 +32,138 @@ /*** SwfdecDebuggerScript ***/ +typedef struct { + SwfdecConstantPool * constant_pool; /* current constant pool */ + GArray * commands; /* SwfdecDebuggerCommands parsed so far */ +} ScriptParser; + +static char * +swfdec_debugger_print_push (ScriptParser *parser, const guint8 *data, guint len) +{ + gboolean first = TRUE; + SwfdecBits bits; + GString *string = g_string_new ("Push"); + + swfdec_bits_init_data (&bits, data, len); + while (s...
2007 Jan 26
0
Branch 'interpreter' - 9 commits - libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_debugger.c libswfdec/swfdec_debugger.h libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_event.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c
...layer_internal.h" #include "js/jsdbgapi.h" +#include "js/jsinterp.h" /* for frame->swf */ /*** SwfdecDebuggerScript ***/ +static gboolean +swfdec_debugger_add_command (gconstpointer bytecode, guint action, + const guint8 *data, guint len, gpointer arrayp) +{ + SwfdecDebuggerCommand command; + + command.code = bytecode; + command.breakpoint = 0; + command.description = swfdec_script_print_action (action, data, len); + g_array_append_val (arrayp, command); + return TRUE; +} + static SwfdecDebuggerScript * -swfdec_debugger_script_new (JSScript *script, const char *name, -...
2007 Jun 06
0
Branch 'as' - 13 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...c_debugger.c +++ b/libswfdec/swfdec_debugger.c @@ -47,6 +47,7 @@ static guint signals[LAST_SIGNAL] = { 0, /*** SwfdecDebuggerScript ***/ typedef struct { + guint version; /* version of parsed file */ SwfdecConstantPool * constant_pool; /* current constant pool */ GArray * commands; /* SwfdecDebuggerCommands parsed so far */ } ScriptParser; @@ -69,12 +70,13 @@ swfdec_debugger_print_push (ScriptParser switch (type) { case 0: /* string */ { - const char *s = swfdec_bits_skip_string (&bits); + char *s = swfdec_bits_get_string_with_version (&bits, parser->version); if (!s...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...-/*** DEBUGGING STUFF ***/ - -/* NB: this must be called _before_ adding bytecode */ -static void -compile_state_debug_add (CompileState *state, const char *format, ...) G_GNUC_PRINTF (2, 3); -static void -compile_state_debug_add (CompileState *state, const char *format, ...) -{ - va_list args; - SwfdecDebuggerCommand command = { NULL, }; - - command.code = NULL + state->bytecode->len; - command.breakpoint = 0; - va_start (args, format); - command.description = g_strdup_vprintf (format, args); - SWFDEC_DEBUG ("%s", command.description); - va_end (args); - state->command_last = G_MAXUINT...
2007 Apr 12
0
Branch 'as' - 15 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c
...rror; } } return g_string_free (string, FALSE); + +error: + g_string_free (string, TRUE); + return "erroneous action Push"; } /* NB: constant pool actions are special in that they are called at init time */ @@ -140,15 +140,14 @@ swfdec_debugger_add_command (gconstpoint SwfdecDebuggerCommand command; command.code = bytecode; - if (action == 0x96) { - /* PUSH */ + if (action == SWFDEC_AS_ACTION_PUSH) { command.description = swfdec_debugger_print_push (parser, data, len); } else { command.description = swfdec_script_print_action (action, data, len); } + g_asser...