data(0)
{ }
+BufferState::~BufferState()
+{
+ delete[] data;
+}
+
void BufferState::set_data(unsigned sz, const void *ptr, GLenum use)
{
usage = use;
std::vector<Array> arrays;
BufferContent();
+
void update(const ArrayState &);
void update_elements(GLenum);
std::string describe() const;
BufferContent content;
BufferState();
+ ~BufferState();
+
void set_data(unsigned, const void *, GLenum);
void set_sub_data(unsigned, unsigned, const void *);
std::string describe() const;
decoder->gldBreak = gldBreak;
}
+Inspector::~Inspector()
+{
+ gldecoder_delete(decoder);
+}
+
void Inspector::decode(const char *data, unsigned len)
{
if(query_state)
public:
Inspector(GlDbg &);
+ ~Inspector();
virtual void decode(const char *, unsigned);
virtual void process_started();
decoder->glXSwapBuffers = glXSwapBuffers;
}
+Profiler::~Profiler()
+{
+ gldecoder_delete(decoder);
+}
+
void Profiler::decode(const char *data, unsigned len)
{
if(enabled)
public:
Profiler(GlDbg &);
+ ~Profiler();
virtual void decode(const char *, unsigned);
private:
}
+CommandInterpreter::~CommandInterpreter()
+{
+ for(CommandMap::iterator i=commands.begin(); i!=commands.end(); ++i)
+ delete i->second;
+}
+
void CommandInterpreter::execute(const string &cmd)
{
unsigned space = cmd.find(' ');
public:
CommandInterpreter(GlDbg &);
+ ~CommandInterpreter();
template<typename T>
Command ®ister_command(const std::string &n, T *o, void (T::*f)(const std::string &))
GlDbg *GlDbg::instance = 0;
GlDbg::GlDbg(int argc, char **argv):
+ done(false),
cmd_interp(*this),
process(vector<string>(argv+1, argv+argc)),
+ sock_fd(-1),
buf_offset(0),
flushing(false),
got_sigchld(false),
printf("Copyright © 2009-2010 Mikkosoft Productions\n");
printf("Type \"help\" for a list of commands\n");
- while(1)
+ while(!done)
tick();
return 0;
{
if(!force && process.get_state()!=Process::INACTIVE)
throw runtime_error("Program is still running");
- exit(0);
+ done = true;
}
void GlDbg::tick()
free(line);
}
else if(pstate==Process::INACTIVE)
- exit(0);
+ done = true;
}
}
typedef std::list<Breakpoint> BreakList;
+ bool done;
CommandInterpreter cmd_interp;
Process process;
int sock_fd;
flavor_init();
}
+Grabber::~Grabber()
+{
+ gldecoder_delete(decoder);
+}
+
void Grabber::decode(const char *data, unsigned len)
{
gldecoder_decode(decoder, data, len);
public:
Grabber(GlDbg &);
+ ~Grabber();
private:
void flavor_init();