]> git.tdb.fi Git - gldbg.git/blobdiff - source/gldbg.h
Add a performance profiler
[gldbg.git] / source / gldbg.h
index fce7d7fa2fd4790f4fa96439690a8ce34875d945..e42e4aa1d1425cb5c105bca4528d6835ad81ad77 100644 (file)
@@ -12,27 +12,43 @@ Distributed under the GPL
 #include <vector>
 #include <msp/core/application.h>
 #include <msp/fs/path.h>
-#include "gldecoder.h"
+#include "commandinterpreter.h"
+#include "glstate.h"
+#include "process.h"
+#include "profiler.h"
+#include "tracer.h"
 
 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;
+       Tracer tracer;
+       GlState glstate;
+       Profiler profiler;
+       bool got_sigchld;
 
        static RegApp<GlDbg> reg;
 
 public:
        GlDbg(int, char **);
        int main();
+       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