#include <vector>
#include <msp/core/application.h>
#include <msp/fs/path.h>
-#include "glstate.h"
+#include "commandinterpreter.h"
+#include "process.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;
+ bool got_sigchld;
static RegApp<GlDbg> reg;
public:
GlDbg(int, char **);
int main();
+ Tracer &get_tracer() { return tracer; }
+ Process &get_process() { return process; }
+ void launch();
+ void quit();
private:
void tick();
- void launch();
+ void check_child();
+ void read_stream();
+ long ptrace(int, void *, void *);
+ virtual void sighandler(int);
};
#endif