]> git.tdb.fi Git - gldbg.git/blobdiff - source/gldbg.h
Add framework necessary to support more modular tools
[gldbg.git] / source / gldbg.h
index 9f26de3f34e872485c5129c0e827f1b69c85d896..543df05a580265b5d88e395f995ffb2b2a0f0438 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of gldbg
-Copyright © 2009  Mikko Rasa, Mikkosoft Productions
+Copyright © 2009-2010  Mikko Rasa, Mikkosoft Productions
 Distributed under the GPL
 */
 
@@ -12,27 +12,47 @@ Distributed under the GPL
 #include <vector>
 #include <msp/core/application.h>
 #include <msp/fs/path.h>
+#include "commandinterpreter.h"
 #include "glstate.h"
+#include "process.h"
+#include "profiler.h"
+#include "tracer.h"
+
+class Tool;
 
 class GlDbg: public Msp::Application
 {
 private:
-       Msp::FS::Path libdir;
-       int pid;
-       std::vector<std::string> args;
+       CommandInterpreter cmd_interp;
+       Process process;
        int sock_fd;
        std::string buffer;
        unsigned buf_offset;
-       GlDecoder *glprint;
+       bool flushing;
+       std::list<Tool *> tools;
+       Tracer tracer;
+       GlState glstate;
+       Profiler profiler;
+       bool got_sigchld;
 
        static RegApp<GlDbg> reg;
 
 public:
        GlDbg(int, char **);
        int main();
+       CommandInterpreter &get_command_interpreter() { return cmd_interp; }
+       Tracer &get_tracer() { return tracer; }
+       GlState &get_glstate() { return glstate; }
+       Profiler &get_profiler() { return profiler; }
+       Process &get_process() { return process; }
+       void launch();
+       void quit(bool);
 private:
        void tick();
-       void launch();
+       void check_child();
+       void read_stream();
+       long ptrace(int, void *, void *);
+       virtual void sighandler(int);
 };
 
 #endif