[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/gui gnash.cpp
From: |
Rob Savoye |
Subject: |
[Gnash-commit] gnash/gui gnash.cpp |
Date: |
Tue, 06 Feb 2007 22:05:02 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Rob Savoye <rsavoye> 07/02/06 22:05:02
Modified files:
gui : gnash.cpp
Log message:
dd support for the debugger.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gnash.cpp?cvsroot=gnash&r1=1.64&r2=1.65
Patches:
Index: gnash.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gnash.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -b -r1.64 -r1.65
--- gnash.cpp 23 Jan 2007 22:49:10 -0000 1.64
+++ gnash.cpp 6 Feb 2007 22:05:02 -0000 1.65
@@ -22,6 +22,7 @@
#include "Player.h"
#include "log.h" // for dbglogfile (I hate this)
#include "rc.h" // for use of rcfile
+#include "debugger.h"
#if defined(_WIN32) || defined(WIN32)
#include "getopt_win32.h"
@@ -39,6 +40,7 @@
#endif // ! Win32
+#include <string>
#include <iostream>
//using namespace gnash; // for dbglogfile
@@ -51,8 +53,13 @@
namespace {
gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
gnash::RcInitFile& rcfile = gnash::RcInitFile::getDefaultInstance();
+#ifdef USE_DEBUGGER
+gnash::Debugger& debugger = gnash::Debugger::getDefaultInstance();
+#endif
}
+//extern bool g_debug;
+
static void
usage()
{
@@ -79,6 +86,7 @@
" -j <width> Set window width\n"
" -k <height> Set window height\n"
" -1 Play once; exit when/if movie reaches the last frame\n"
+ " -g Turn on the Flash debugger\n"
" -r <0|1|2|3>\n"
" 0 disables both rendering & sound (good for batch
tests)\n"
" 1 enables rendering & disables sound\n"
@@ -155,7 +163,7 @@
}
}
- while ((c = getopt (argc, argv, "hvaps:cd:x:r:t:b:1wj:k:u:P:U:")) != -1)
+ while ((c = getopt (argc, argv, "hvaps:cd:x:r:t:b:1wj:k:u:P:U:g")) != -1)
{
switch (c) {
// case 'c' (Disable SDL core dumps) is decoded in sdl.cpp:init()
@@ -206,6 +214,15 @@
player.setWidth ( strtol(optarg, NULL, 0) );
dbglogfile << "Setting width to: " << player.getWidth() <<
std::endl;
break;
+ case 'g':
+#ifdef USE_DEBUGGER
+ debugger.enabled(true);
+ debugger.console();
+ dbglogfile << "Setting debugger ON" << std::endl;
+#else
+ dbglogfile << "WARNING: The debugger has been disabled at
configuration time" << std::endl;
+#endif
+ break;
case 'k':
player.setHeight ( strtol(optarg, NULL, 0) );
dbglogfile << "Setting height to: " << player.getHeight() <<
std::endl;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash/gui gnash.cpp,
Rob Savoye <=