]> git.tdb.fi Git - gldbg.git/blobdiff - source/gldbg.cpp
Decouple the existing tools from the debugger core
[gldbg.git] / source / gldbg.cpp
index bc621ce490e2679c91e30e6ca11348616559011d..7990fabae61f6f9ed4b1daef344b5715ded4004f 100644 (file)
@@ -16,7 +16,7 @@ Distributed under the GPL
 #include <msp/io/print.h>
 #include <msp/strings/lexicalcast.h>
 #include "gldbg.h"
-#include "glprint.h"
+#include "gldecoder.h"
 #include "tool.h"
 
 using namespace std;
@@ -39,6 +39,12 @@ GlDbg::GlDbg(int argc, char **argv):
                tools.push_back((*i)->create(*this));
 }
 
+GlDbg::~GlDbg()
+{
+       for(list<Tool *>::iterator i=tools.begin(); i!=tools.end(); ++i)
+               delete *i;
+}
+
 int GlDbg::main()
 {
        catch_signal(SIGINT);
@@ -46,7 +52,7 @@ int GlDbg::main()
        set_loop_mode(TICK_BUSY);
 
        IO::print("GLdbg 0.0\n");
-       IO::print("Copyright © 2009 Mikkosoft Productions\n");
+       IO::print("Copyright © 2009-2010 Mikkosoft Productions\n");
        IO::print("Type \"help\" for a list of commands\n");
 
        Application::main();
@@ -140,9 +146,6 @@ void GlDbg::read_stream()
                                        break;
                                for(list<Tool *>::iterator i=tools.begin(); i!=tools.end(); ++i)
                                        (*i)->decode(data, size);
-                               tracer.decode(data, len);
-                               glstate.decode(data, len);
-                               profiler.decode(data, len);
                                buf_offset += size;
                        }
                        if(buf_offset>8192)