[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/ActionExec.cpp
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/ActionExec.cpp |
Date: |
Fri, 30 Jun 2006 00:31:32 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/06/30 00:31:32
Modified files:
. : ChangeLog
server : ActionExec.cpp
Log message:
* server/ActionExec.cpp: print stack debugging informations during
actions execution if DEBUG_STACK is defined (undef by default) and -v is given
on command line.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.444&r2=1.445
http://cvs.savannah.gnu.org/viewcvs/gnash/server/ActionExec.cpp?cvsroot=gnash&r1=1.6&r2=1.7
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.444
retrieving revision 1.445
diff -u -b -r1.444 -r1.445
--- ChangeLog 30 Jun 2006 00:15:44 -0000 1.444
+++ ChangeLog 30 Jun 2006 00:31:31 -0000 1.445
@@ -1,5 +1,8 @@
2006-06-30 Sandro Santilli <address@hidden>
+ * server/ActionExec.cpp: print stack debugging
+ informations during actions execution if DEBUG_STACK
+ is defined (undef by default) and -v is given on command line.
* server/swf/ASHandlers.cpp, server/swf/ASHandlers.h:
static action handlers made private in SWFHandlers class;
added an SWFHandlers::action_name(action_type) utility method.
Index: server/ActionExec.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/ActionExec.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- server/ActionExec.cpp 29 Jun 2006 19:15:00 -0000 1.6
+++ server/ActionExec.cpp 30 Jun 2006 00:31:31 -0000 1.7
@@ -54,13 +54,24 @@
# include <pthread.h>
#endif
+#include <sstream>
#include <string>
#include <stdlib.h> // for strtod
+#ifndef DEBUG_STACK
+// temporarly disabled as will produce lots of output with -v
+// we'd need another switch maybe, as -va does also produce
+// too much information for my tastes. I really want just
+// to see how stack changes while executing actions...
+// --strk Fri Jun 30 02:28:46 CEST 2006
+//#define DEBUG_STACK 1
+#endif
+
using namespace gnash;
using namespace SWF;
using std::string;
using std::endl;
+using std::stringstream;
namespace gnash {
@@ -118,6 +129,13 @@
sprite_instance* original_target = env.get_target();
//UNUSED(original_target); // Avoid warnings.
+#if DEBUG_STACK
+ log_msg("at ActionExec operator() start, pc=%d, stop_pc=%d,
code.size=%d, stack:", pc, stop_pc, code.size());
+ stringstream ss;
+ env.dump_stack(ss);
+ log_msg("%s", ss.str().c_str());
+#endif
+
while (pc<stop_pc)
{
@@ -157,6 +175,15 @@
ash.execute((action_type)action_id, *this);
+#if DEBUG_STACK
+ const char* action_name = ash.action_name((action_type)action_id);
+ log_msg( "After execution of action '%s', pc is %d.",
+ action_name, pc);
+ stringstream ss;
+ env.dump_stack(ss);
+ log_msg("%s", ss.str().c_str());
+#endif
+
// Control flow actions will change the PC (next_pc)
pc = next_pc;