Top | ![]() |
![]() |
![]() |
![]() |
This section is only interesting for people that want to look into debugging.
A SwfdecAsFrame describes a currently executing function while it is
running. On every new function call, a new frame is created and pushed on top
of the frame stack. To get the topmost one, use
swfdec_as_context_get_frame()
. After that you can inspect various properties
of the frame, like the current stack.
a SwfdecAsFrame is a SwfdecAsObject, so it is possible to set variables on
it. These are local variables inside the executing function. So you can use
functions such as swfdec_as_object_get_variable()
to inspect them.
SwfdecAsFrame *
swfdec_as_frame_get_next (SwfdecAsFrame *frame
);
Gets the next frame in the frame stack. The next frame is the frame that
will be executed after this frame
.
SwfdecScript *
swfdec_as_frame_get_script (SwfdecAsFrame *frame
);
Gets the script associated with the given frame
. If the frame references
a native function, there will be no script and this function returns NULL
.
SwfdecAsValue * swfdec_as_stack_iterator_init (SwfdecAsStackIterator *iter
,SwfdecAsContext *context
,SwfdecAsFrame *frame
);
Initializes iter
to walk the stack of frame
. The first value on the stack
will alread be returned. This makes it possible to write a simple loop to
print the whole stack:
1 2 3 4 5 |
value = swfdec_as_stack_iterator_next (&iter)) { char *s = swfdec_as_value_to_debug (value); g_print ("%s\n", s); g_free (s); }]| |
SwfdecAsValue * swfdec_as_stack_iterator_init_arguments (SwfdecAsStackIterator *iter
,SwfdecAsContext *context
,SwfdecAsFrame *frame
);
Initializes a stack iterator to walk the arguments passed to the given frame
. See
swfdec_as_stack_iterator_init()
about suggested iterator usage.
SwfdecAsValue *
swfdec_as_stack_iterator_next (SwfdecAsStackIterator *iter
);
Gets the next value on the stack.